[FFmpeg-devel] [PATCH] Compute proper pkt->pos in mxfdec.c

Tomas Härdin tomas.hardin
Wed May 12 16:48:04 CEST 2010


Hi

Today I noticed that the MXF demuxer calculates incorrect values for its
packet offsets (pkt->pos). They point at the start of the KLV triplets,
not the essence data itself (which is what pos is for unless I'm
mistaken).

The attached patch fixes this by setting pkt->pos to klv.offset + 16 +
berlength, where 16 is the length of a UID and berlength is the length
of the BER encoded length (typically 4). The patch also adjusts the
regtests since the offsets were wrong (adjusted +20).

Tests pass on r23083. Current revision does not pass tests on its own,
so I can't test against that.

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mxf_pkt_pos.patch
Type: text/x-patch
Size: 10154 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100512/412f24de/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100512/412f24de/attachment.pgp>



More information about the ffmpeg-devel mailing list