diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-28 11:35:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-28 11:35:00 +0100 |
| commit | ead1fe52045b83a1a37479bc08f51a4c626e0f8d (patch) | |
| tree | 5b0a2df45b0142e0cd41942449f2dbb0e7b9d749 /src/lib/decoder.cc | |
| parent | 21ef63ff3765a4896920fd7b68ec2b90b49fa245 (diff) | |
Fix probably-incorrect parameter passing, not spotted by compiler due to use of void.
Diffstat (limited to 'src/lib/decoder.cc')
| -rw-r--r-- | src/lib/decoder.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index 2f02147e3..973582ca4 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -464,12 +464,18 @@ Decoder::setup_video_filters () << sample_aspect_ratio_denominator(); int r; + if ((r = avfilter_graph_create_filter (&_buffer_src_context, buffer_src, "in", a.str().c_str(), 0, graph)) < 0) { throw DecodeError ("could not create buffer source"); } - enum PixelFormat pixel_formats[] = { pixel_format(), PIX_FMT_NONE }; - if (avfilter_graph_create_filter (&_buffer_sink_context, buffer_sink, "out", 0, pixel_formats, graph) < 0) { + AVBufferSinkParams* sink_params = av_buffersink_params_alloc (); + PixelFormat* pixel_fmts = new PixelFormat[2]; + pixel_fmts[0] = pixel_format (); + pixel_fmts[1] = PIX_FMT_NONE; + sink_params->pixel_fmts = pixel_fmts; + + if (avfilter_graph_create_filter (&_buffer_sink_context, buffer_sink, "out", 0, sink_params, graph) < 0) { throw DecodeError ("could not create buffer sink."); } |
