diff mbox

[FFmpeg-devel] Fix: Branch condition of KLV metadata AU header remover.

Message ID KAXPR01MB1285F0A31483A5227C483B3793200@KAXPR01MB1285.jpnprd01.prod.outlook.com
State New
Headers show

Commit Message

Motoki Shimizu Aug. 6, 2018, 7:18 a.m. UTC
KLV metadata access unit header remover has an effect on the other unrelated Packetized metadata.
Branch condition code should be modified to check the codec_id.
---
 libavformat/mpegts.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--
1.8.3.1
diff mbox

Patch

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index a5cb17a..bc6bdc6 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1208,7 +1208,9 @@  skip:
                     p += sl_header_bytes;
                     buf_size -= sl_header_bytes;
                 }
-                if (pes->stream_type == 0x15 && buf_size >= 5) {
+                if (pes->stream_type == 0x15 &&
+                    pes->st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV &&
+                    buf_size >= 5) {
                     /* skip metadata access unit header */
                     pes->pes_header_size += 5;
                     p += 5;