X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_filter_graph.cc;h=534dd6142fce4e9765245f6b25df273e68e427fe;hb=58b5c57c9a4767c786a1428f243c60ff52c82c26;hp=201150560bb1ffaae82a7c72e8c97c3682a2eab1;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/lib/video_filter_graph.cc b/src/lib/video_filter_graph.cc index 201150560..534dd6142 100644 --- a/src/lib/video_filter_graph.cc +++ b/src/lib/video_filter_graph.cc @@ -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"; } -