[FFmpeg-devel] [PATCH] lavf: Add an XMV demuxer

Sven Hesse drmccoy at drmccoy.de
Thu Aug 18 19:32:35 CEST 2011


On 2011-08-18 18:03:15 +0200, Michael Niedermayer wrote:
> This patch has been applied by diego and merged into
> ffmpeg.

In case you haven't seen, the headers of the new files brought in by
the merge still refer to "Libav", though. :P

> The comments should use doxygen compatible syntax
> 
> The various offsets in the various structs should possibly be 64bit
> or there may be need for integer overflow checks on their updates
> [...]
> this struct could be put in XMVAudioTrack to avoid the second malloc
> & free, also it would possibly avoid a memleak if the second
> alloc fails

Hmm, right.

> The struct fields should already be 0 at the begin from av_mallocz() thats
> used to allocate the context

Ah, didn't know that.

> Can these variables be 0 ? If so some checks are needed to avoid div
> by zero

xmv->video.frame_count is already checked for 0 in line 318.
packet->track->block_align can only be 0 if the number of channels in
the audio track is 0, which really shouldn't happen. Might be worth
checking for in xmv_read_header() though.

> it might be faster (yet stil suboptimal) to read the whole and then
> seperately bswap it

Hmm, right.

Attaching some patches addressing these issues.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xmv-Make-the-various-offset-variables-uint64_t.patch
Type: text/x-diff
Size: 1534 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110818/5da76d21/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-xmv-Merge-XMVAudioTrack-into-XMVAudioPacket.patch
Type: text/x-diff
Size: 6615 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110818/5da76d21/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-xmv-Add-some-doxygen-comments.patch
Type: text/x-diff
Size: 5528 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110818/5da76d21/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-xmv-Remove-superfluous-zeroing-of-already-zero-d-dat.patch
Type: text/x-diff
Size: 1109 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110818/5da76d21/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-xmv-Add-some-sanity-checks.patch
Type: text/x-diff
Size: 2036 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110818/5da76d21/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-xmv-Read-the-video-packet-data-first-then-swap-its-b.patch
Type: text/x-diff
Size: 1572 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110818/5da76d21/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110818/5da76d21/attachment.asc>


More information about the ffmpeg-devel mailing list