summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-04 17:34:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-04 17:34:47 +0200
commitcb3fd029b7dce5b8f01f3bb7f0cfe1c6e384bb44 (patch)
tree7ecf84c49dc2e44860fe8715c7a17d393e947e88 /ffplay.c
parente214306775ce0bcdf2c0366f89faf7e773a73fbe (diff)
ffplay: add a 3rd state to infbuf for autodetection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 3a21bfa68d..9e26399215 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -278,7 +278,7 @@ static int exit_on_keydown;
static int exit_on_mousedown;
static int loop = 1;
static int framedrop = -1;
-static int infinite_buffer = 0;
+static int infinite_buffer = -1;
static enum ShowMode show_mode = SHOW_MODE_NONE;
static const char *audio_codec_name;
static const char *subtitle_codec_name;
@@ -2538,7 +2538,7 @@ static int read_thread(void *arg)
}
/* if the queue are full, no need to read more */
- if (!infinite_buffer &&
+ if (infinite_buffer<1 &&
(is->audioq.size + is->videoq.size + is->subtitleq.size > MAX_QUEUE_SIZE
|| ( (is->audioq .nb_packets > MIN_FRAMES || is->audio_stream < 0 || is->audioq.abort_request)
&& (is->videoq .nb_packets > MIN_FRAMES || is->video_stream < 0 || is->videoq.abort_request)