aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-09-06 21:51:31 +0200
committerJanne Grunau <janne-libav@jannau.net>2012-09-17 10:49:27 +0200
commit2f34021d57b1343bb01b377a4797bef7cbc7be3c (patch)
treebc7fd24994cd0ae163769a8ad291e6b45dbcd74f /avconv.c
parenta5ea623b364b8a605fc92c973a98cd66cb7e6a5d (diff)
downloadffmpeg-2f34021d57b1343bb01b377a4797bef7cbc7be3c.tar.gz
avconv: flush filtered frames before reconfiguring filters
This prevents lost frames after a resolution change.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/avconv.c b/avconv.c
index ea736066ec..df09b21c78 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;