ffmpeg | branch: master | Anthony Delannoy <anthony.2lan...@gmail.com> | Tue Sep 3 17:54:24 2019 +0200| [39f129593756e3e270ed3881ca076627f30e1eb7] | committer: Marton Balint
avformat/mpegts: Check if ready on SCTE reception On some DVB stream SCTE-35 data packet are available before the end of MpegTSContext initialization. We have to check if it is the case to avoid a SEGFAULT. Signed-off-by: Marton Balint <c...@passwd.hu> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=39f129593756e3e270ed3881ca076627f30e1eb7 --- libavformat/mpegts.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 58902527c5..0415ceea02 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1725,6 +1725,13 @@ static void scte_data_cb(MpegTSFilter *filter, const uint8_t *section, if (idx < 0) return; + /** + * In case we receive an SCTE-35 packet before mpegts context is fully + * initialized. + */ + if (!ts->pkt) + return; + new_data_packet(section, section_len, ts->pkt); ts->pkt->stream_index = idx; prg = av_find_program_from_stream(ts->stream, NULL, idx); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".