• Romain Beauxis's avatar
    libavformat/mpegts.c: fix hardcoded 5-bytes skip for metadata streams. · 468615f2
    Romain Beauxis authored
    Before the introduction of AV_CODEC_ID_TIMED_ID3 for timed_id3 metadata streams
    in mpegts (commit 4a4437c0), AV_CODEC_ID_SMPTE_KLV
    was the only existing codec for metadata.
    
    It seems that this codec has a 5-bytes metadata header[1] that, for some reason,
    was always skipped when decoding data packets.
    
    However, when working with a AV_CODEC_ID_TIMED_ID3 streams, this results in the
    5 first bytes of the payload being cut-off, which includes essential informations
    such as the ID3 tag version.
    
    This patch fixes the issue by keeping the 5-bytes skip only for AV_CODEC_ID_SMPTE_KLV
    streams.
    Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
    Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
    468615f2
mpegts.c 116 KB