avformat/mpegts: skip non-PMT tids earlier
authorAman Gupta <aman@tmm1.net>
Tue, 8 May 2018 22:07:35 +0000 (15:07 -0700)
committerAman Gupta <aman@tmm1.net>
Wed, 9 May 2018 19:39:55 +0000 (12:39 -0700)
commit2c500f50972c19f25ebca783ba9374d6a0c23efb
treeab0d94334043907fea57bbb7cfff728e10b66045
parent12ceaf0fbacb20b86bdc343ba2bbc71d2fff72e0
avformat/mpegts: skip non-PMT tids earlier

This mimics the logic flow in all the other callbacks
(pat_cb, sdt_cb, m4sl_cb), and avoids calling skip_identical()
for non PMT_TID packets.

Since skip_identical modifies internal state like
MpegTSSectionFilter.last_ver, this change prevents unnecessary
reprocessing on some streams which contain multiple tables in
the PMT pid. This can be observed with streams from certain US
cable providers, which include both tid=0x2 and another unspecified
tid=0xc0.

Signed-off-by: Aman Gupta <aman@tmm1.net>
libavformat/mpegts.c