summaryrefslogtreecommitdiff
path: root/ffmpeg.h
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2013-10-25 10:58:14 +0200
committerNicolas George <george@nsup.org>2014-02-20 11:22:55 +0100
commit299a56879d2d790ac0c40d09af18e7f03471de9e (patch)
treed272a3952d09c79b85b24f0fc11de99ffd50a1a6 /ffmpeg.h
parent3edc3b159503d512c919b3d5902f7026e961823a (diff)
ffmpeg: make reading packets from thread blocking.
If a packet is not ready on the input selected by ffmpeg, it will read from another input instead. If that happens repeatedly, frames will accumulate somewhere later in the processing to ensure streams synchronization. It can happen in particular when reading from a slow medium or an expensive lavfi filter graph. Make reading from normal demuxers on non-streamed data and from the lavfi pseudo-device blocking to avoid that. Should fix trac ticket #3079.
Diffstat (limited to 'ffmpeg.h')
-rw-r--r--ffmpeg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ffmpeg.h b/ffmpeg.h
index 04e5b7274b..151667d74a 100644
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -327,6 +327,7 @@ typedef struct InputFile {
#if HAVE_PTHREADS
pthread_t thread; /* thread reading from this file */
+ int non_blocking; /* reading packets from the thread should not block */
int finished; /* the thread has exited */
int joined; /* the thread has been joined */
pthread_mutex_t fifo_lock; /* lock for access to fifo */