mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-10 00:59:38 +00:00
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 <cus@passwd.hu>
(cherry picked from commit 39f1295937
)
This commit is contained in:
parent
0f8e2a0b86
commit
611eb95943
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user