[FFmpeg-devel] [PATCH 2/2] avformat/nutdec: skip EOR packets if they are subtitles
Paul B Mahol
onemda at gmail.com
Tue Dec 18 15:56:55 EET 2018
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavformat/nutdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 056ef59d00..1d1c449bbd 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -1080,6 +1080,10 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code)
stc = &nut->stream[stream_id];
+ if (stc->last_flags & FLAG_EOR &&
+ s->streams[stream_id]->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE)
+ return 1;
+
if (stc->last_flags & FLAG_KEY)
stc->skip_until_key_frame = 0;
--
2.17.1
More information about the ffmpeg-devel
mailing list