diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-22 01:17:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-22 01:17:45 +0100 |
| commit | 45eb286ab51444352f2e0fef0fe1d5e5663c8c6c (patch) | |
| tree | fec8393feb5d3fd70fb40b3bd1e97cda434f2fd1 /src/lib/decoder.cc | |
| parent | 69f0046b6f6fd6b6568df2e8f3c47ce49f3a6996 (diff) | |
Tweak to build and maybe run with current FFmpeg git.
Diffstat (limited to 'src/lib/decoder.cc')
| -rw-r--r-- | src/lib/decoder.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index 38de4e3a1..9cbd93405 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -25,7 +25,7 @@ #include <stdint.h> extern "C" { #include <libavfilter/avfiltergraph.h> -#include <libavfilter/vsrc_buffer.h> +#include <libavfilter/buffersrc.h> #ifndef DVDOMATIC_FFMPEG_0_8_3 #include <libavfilter/avcodec.h> #include <libavfilter/buffersink.h> @@ -242,16 +242,20 @@ Decoder::process_video (AVFrame* frame) #else - if (av_vsrc_buffer_add_frame (_buffer_src_context, frame, 0) < 0) { + if (av_buffersrc_write_frame (_buffer_src_context, frame) < 0) { throw DecodeError ("could not push buffer into filter chain."); } #endif +#ifdef DVDOMATIC_FFMPEG_0_8_3 while (avfilter_poll_frame (_buffer_sink_context->inputs[0])) { +#else + while (av_buffersink_read (_buffer_sink_context, 0)) { +#endif #ifdef DVDOMATIC_FFMPEG_0_8_3 - + int r = avfilter_request_frame (_buffer_sink_context->inputs[0]); if (r < 0) { throw DecodeError ("could not request filtered frame"); |
