summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-01-10 22:36:35 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-01-10 22:36:35 +0000
commite6c0297f1ca2234477aafc62e76a6428c56595d7 (patch)
tree33271efce54d54b46381b45a72844e68c8b264cd /ffplay.c
parent909678c70767b5eafe9f5619c42f9c0e72404097 (diff)
fixing some seek failure issues
Originally committed as revision 2688 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ffplay.c b/ffplay.c
index c5c2ca1349..6fbb91e158 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1406,15 +1406,16 @@ static int decode_thread(void *arg)
#endif
if (is->seek_req) {
/* XXX: must lock decoder threads */
- if (is->audio_stream >= 0) {
- packet_queue_flush(&is->audioq);
- }
- if (is->video_stream >= 0) {
- packet_queue_flush(&is->videoq);
- }
ret = av_seek_frame(is->ic, -1, is->seek_pos);
if (ret < 0) {
fprintf(stderr, "%s: error while seeking\n", is->ic->filename);
+ }else{
+ if (is->audio_stream >= 0) {
+ packet_queue_flush(&is->audioq);
+ }
+ if (is->video_stream >= 0) {
+ packet_queue_flush(&is->videoq);
+ }
}
is->seek_req = 0;
}