aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-14 02:02:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-16 04:38:54 +0200
commitc151e0ca1517814a604b4fc514eddcafb0e3832a (patch)
tree406684e237579c44ef0d71227cd1a8ee7f6d1fcc /ffplay.c
parent11f8f2c0f3fcf371afaa715d26d765c91a8fdf8d (diff)
downloadffmpeg-c151e0ca1517814a604b4fc514eddcafb0e3832a.tar.gz
ffplay: reque attached pictures on channel changes.
Fixes Ticket1473 Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 282d56f039..2bb26e6306 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -141,6 +141,7 @@ typedef struct VideoState {
int force_refresh;
int paused;
int last_paused;
+ int que_attachments_req;
int seek_req;
int seek_flags;
int64_t seek_pos;
@@ -2503,6 +2504,10 @@ static int read_thread(void *arg)
is->seek_req = 0;
eof = 0;
}
+ if (is->que_attachments_req) {
+ avformat_queue_attached_pictures(ic);
+ is->que_attachments_req = 0;
+ }
/* if the queue are full, no need to read more */
if (!infinite_buffer &&
@@ -2680,6 +2685,8 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
the_end:
stream_component_close(is, old_index);
stream_component_open(is, stream_index);
+ if (codec_type == AVMEDIA_TYPE_VIDEO)
+ is->que_attachments_req = 1;
}