Allow + in DCP names for ISDCF RU rating strings.
[dcpomatic.git] / src / lib / video_filter_graph.cc
index 201150560bb1ffaae82a7c72e8c97c3682a2eab1..534dd6142fce4e9765245f6b25df273e68e427fe 100644 (file)
@@ -84,14 +84,9 @@ VideoFilterGraph::can_process (dcp::Size s, AVPixelFormat p) const
 string
 VideoFilterGraph::src_parameters () const
 {
-       SafeStringStream a;
-
-       a << "video_size=" << _size.width << "x" << _size.height << ":"
-         << "pix_fmt=" << _pixel_format << ":"
-         << "time_base=1/1:"
-         << "pixel_aspect=1/1";
-
-       return a.str ();
+       char buffer[256];
+       snprintf (buffer, sizeof(buffer), "video_size=%dx%d:pix_fmt=%d:time_base=1/1:pixel_aspect=1/1", _size.width, _size.height, _pixel_format);
+       return buffer;
 }
 
 void *
@@ -99,7 +94,6 @@ VideoFilterGraph::sink_parameters () const
 {
        AVBufferSinkParams* sink_params = av_buffersink_params_alloc ();
        AVPixelFormat* pixel_fmts = new AVPixelFormat[2];
-       pixel_fmts = new AVPixelFormat[2];
        pixel_fmts[0] = _pixel_format;
        pixel_fmts[1] = AV_PIX_FMT_NONE;
        sink_params->pixel_fmts = pixel_fmts;
@@ -117,4 +111,3 @@ VideoFilterGraph::sink_name () const
 {
        return "buffersink";
 }
-