mirror of https://git.ffmpeg.org/ffmpeg.git
mpegts: do not return from ff_mpegts_parse_packet() after having seen the first PMT
It prevents leaving the AVPacket uninitialized.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bc38e83793
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
feef77ec3a
commit
cbfd34246c
|
@ -1862,10 +1862,8 @@ int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
|
|||
|
||||
len1 = len;
|
||||
ts->pkt = pkt;
|
||||
ts->stop_parse = 0;
|
||||
for(;;) {
|
||||
if (ts->stop_parse>0)
|
||||
break;
|
||||
ts->stop_parse = 0;
|
||||
if (len < TS_PACKET_SIZE)
|
||||
return -1;
|
||||
if (buf[0] != 0x47) {
|
||||
|
@ -1875,6 +1873,8 @@ int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
|
|||
handle_packet(ts, buf);
|
||||
buf += TS_PACKET_SIZE;
|
||||
len -= TS_PACKET_SIZE;
|
||||
if (ts->stop_parse == 1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return len1 - len;
|
||||
|
|
Loading…
Reference in New Issue