summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-12-27 01:59:12 +0100
committerMarton Balint <cus@passwd.hu>2013-01-19 00:48:06 +0100
commitf65e57124f8afd7097f52f8ffa8133401f0a0f07 (patch)
treeff3fe059f4b99cd6b77f8c3c5d0b135e339bbb6a /ffplay.c
parent1427c6842d216a7071bdb46c8365f15187bc7ffe (diff)
ffplay: flush video filters on seek
Actually we just re-create the filters, since there is no way to flush them. Fixes hangup with yadif filter on seeking forward caused by a filtered frame with a pts before the seek. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index a46eb8661e..93090ad60b 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1810,6 +1810,7 @@ static int video_thread(void *arg)
int last_w = 0;
int last_h = 0;
enum AVPixelFormat last_format = -2;
+ int last_serial = -1;
if (codec->codec->capabilities & CODEC_CAP_DR1) {
is->use_dr1 = 1;
@@ -1840,7 +1841,8 @@ static int video_thread(void *arg)
#if CONFIG_AVFILTER
if ( last_w != frame->width
|| last_h != frame->height
- || last_format != frame->format) {
+ || last_format != frame->format
+ || last_serial != serial) {
av_log(NULL, AV_LOG_INFO, "Frame changed from size:%dx%d to size:%dx%d\n",
last_w, last_h, frame->width, frame->height);
avfilter_graph_free(&graph);
@@ -1858,6 +1860,7 @@ static int video_thread(void *arg)
last_w = frame->width;
last_h = frame->height;
last_format = frame->format;
+ last_serial = serial;
}
frame->pts = pts_int;