mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
mpegts: add the judgement if a new program is created successfully
Add the judement after create a new program to avoid segment fault. Signed-off-by: Di Wu <di1028.wu@samsung.com> Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d267a0f8c1
commit
0e406aba14
@ -1925,8 +1925,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
||||
} else {
|
||||
MpegTSFilter *fil = ts->pids[pmt_pid];
|
||||
program = av_new_program(ts->stream, sid);
|
||||
program->program_num = sid;
|
||||
program->pmt_pid = pmt_pid;
|
||||
if (program) {
|
||||
program->program_num = sid;
|
||||
program->pmt_pid = pmt_pid;
|
||||
}
|
||||
if (fil)
|
||||
if ( fil->type != MPEGTS_SECTION
|
||||
|| fil->pid != pmt_pid
|
||||
|
Loading…
Reference in New Issue
Block a user