Skip to content

Commit af7562a

Browse files
committed
Ignore es_map_length when parsing mpeg program stream map.
Fixes ticket #3195.
1 parent e2bf00c commit af7562a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libavformat/mpeg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ static long mpegps_psm_parse(MpegDemuxContext *m, AVIOContext *pb)
193193
/* skip program_stream_info */
194194
avio_skip(pb, ps_info_length);
195195
es_map_length = avio_rb16(pb);
196+
/* Ignore es_map_length, trust psm_length */
197+
es_map_length = psm_length - ps_info_length - 10;
196198

197199
/* at least one es available? */
198200
while (es_map_length >= 4){

0 commit comments

Comments
 (0)