[FFmpeg-cvslog] avconv: flush filtered frames before reconfiguring filters
Janne Grunau
git at videolan.org
Mon Sep 17 15:21:35 CEST 2012
ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Thu Sep 6 21:51:31 2012 +0200| [2f34021d57b1343bb01b377a4797bef7cbc7be3c] | committer: Janne Grunau
avconv: flush filtered frames before reconfiguring filters
This prevents lost frames after a resolution change.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f34021d57b1343bb01b377a4797bef7cbc7be3c
---
avconv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/avconv.c b/avconv.c
index ea73606..df09b21 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1245,6 +1245,10 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
ist->resample_width, ist->resample_height, av_get_pix_fmt_name(ist->resample_pix_fmt),
decoded_frame->width, decoded_frame->height, av_get_pix_fmt_name(decoded_frame->format));
+ ret = poll_filters();
+ if (ret < 0 && (ret != AVERROR_EOF && ret != AVERROR(EAGAIN)))
+ av_log(NULL, AV_LOG_ERROR, "Error while filtering.\n");
+
ist->resample_width = decoded_frame->width;
ist->resample_height = decoded_frame->height;
ist->resample_pix_fmt = decoded_frame->format;
More information about the ffmpeg-cvslog
mailing list