[FFmpeg-devel] Fix for KLV in mpegts
vagran.ast at gmail.com
Fri Dec 7 12:06:36 EET 2018
This fixes bug which prevents from proper muxing-in KLV stream into mpeg-ts.
char *side_data = NULL;
int stream_id = -1;
side_data = av_packet_get_side_data(pkt,
stream_id = side_data;
One-byte stream ID is read from "char *" array to integer making it to
sign-extend which is not correct. Although it writes it correctly to
stream, since it is treated as one byte again, but it fails with some
condition checks, e.g. in mpegtsenc.c:1278:
if (stream_id == 0xbd) /* asynchronous KLV */
pts = dts = AV_NOPTS_VALUE;
stream_id value in such case is 0xffffffbd.
Fix should be changing side_data type from "char *" to "uint8_t *".
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 800 bytes
Desc: not available
More information about the ffmpeg-devel