summaryrefslogtreecommitdiff
path: root/ffmpeg.h
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-03-02 16:01:01 +0100
committerwm4 <nfxjfg@googlemail.com>2017-03-03 08:45:43 +0100
commit7dd44cde2abb156710f26a08b6cd6c8dd9a9793d (patch)
treed9339c09ab2b06216cd14127ee82d63cfe5014d5 /ffmpeg.h
parent736f4af4fea44d15c5d08558d3fe6f1a0fc98173 (diff)
ffmpeg: delay processing of subtitles before filters are initialized
If a subtitle packet came before the first video frame could be fully decoded, the subtitle packet would get discarded. This puts the subtitle into a queue instead, and processes it once the attached filter graph is initialized.
Diffstat (limited to 'ffmpeg.h')
-rw-r--r--ffmpeg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ffmpeg.h b/ffmpeg.h
index 59f6cb3659..06a1251124 100644
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -337,6 +337,7 @@ typedef struct InputStream {
struct sub2video {
int64_t last_pts;
int64_t end_pts;
+ AVFifoBuffer *sub_queue; ///< queue of AVSubtitle* before filter init
AVFrame *frame;
int w, h;
} sub2video;
@@ -636,6 +637,8 @@ int filtergraph_is_simple(FilterGraph *fg);
int init_simple_filtergraph(InputStream *ist, OutputStream *ost);
int init_complex_filtergraph(FilterGraph *fg);
+void sub2video_update(InputStream *ist, AVSubtitle *sub);
+
int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame);
int ffmpeg_parse_options(int argc, char **argv);