[FFmpeg-devel] [RFC] stream parsing

Michael Niedermayer michaelni
Sat Sep 25 01:53:19 CEST 2010

On Wed, Sep 22, 2010 at 02:02:15AM +0200, Benjamin Larsson wrote:
> Hi, I've found a few files where the channel layout in the container vs
> the stream miss matches (1 avi with dts and 1 mkv, issue 2137). That got
> me thinking about the channel layout mask. In some containers it is
> possible to just set a channel count, which leads to ffmpeg just
> guessing the layout. Instead I suggest that when the channel count is >2
> do a AVSTREAM_PARSE_HEADERS by default instead of trusting the
> container. So what do you think would that be acceptable? Otherwise I
> have to add patches like the one in issue 2137 to every demuxer that we
> find broken files for.

sounds wrong
av_find_stream_info() could easily be made to detect the lack of precisse
channel layout and in this case force at least one frame to be decoded or
frames to be decoded until it is set. this may or may not need to be
limited to specific codecs (we dont want too many frames decoded due to
delay especially for codecs that never could set it so we might need a
flag in AVCodec then)
but either way something around av_find_stream_info() seems better than playing
with parser flags

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100925/c720ae5e/attachment.pgp>

More information about the ffmpeg-devel mailing list