[FFmpeg-devel] Fixing the MXF decoder for P2 files.
Richard Spindler
richard.spindler
Sat Mar 15 11:47:45 CET 2008
Baptiste Coudurier <baptiste.coudurier <at> smartjog.com> writes:
> File is clip wrapped. All frames are in one KLV packet.
>
> MXF demuxer does not support clip wrapped DV content (all P2 files),
> as it would require a DV parser, which could extract single frames
> from the KLV packet. I have not much time atm to do that, I'll try to,
> feel free to send a patch though.
Hi,
I am trying to fix the decoding of mxf files, as found on P2 media, and I have
some questions about how a sane solution should look like.
For now, I've been looking through the code, and the following thing happens,
as far as I am aware.
libavformat/mxf.c demuxes the file, and in its mxf_read_packet
function, it returns a packet that contains ALL video
frames for that file.
Then that packet is passed to libavcodec/dv.c, calling the function
dvvideo_decode_frame, which treats this huge packet as if it was only
one single frame, decodes it, and then the rest of the frames in this packet is
discharged.
I wonder where this would need to be fixed, in the mxf demuxer, or in
the dv decoder, or somewhere else? And what would be the "correct" way
to handle this, splitting this huge data-chunk into several smaller
packets in the demuxer? Doesn't seem "correct" to me?
thx
Richard
More information about the ffmpeg-devel
mailing list