[FFmpeg-devel] AC3 bitrate not set if container is Matroska / issue 807

Christian Cier-Zniewski christian.cier
Wed Feb 10 10:52:32 CET 2010


I have several Matroska Test-Files where the bitrate of the AC3 streams 
is not getting set in ffmpeg at all. This causes problems when 
generating timestamps for the MPEG-TS muxer for example.

The attached patch fixes this. But I am not sure if this is the right 
place to fix this (matroskadec.c).

Another possibility would be to modify the function 
has_codec_parameters() in libavformat/utils.c and add a condition that 
tests if the bitrate is set in case of CODEC_ID_AC3. I have tried that 
and it would also work. This would mean a general approach and is not 
specific to Matroska. I presume that the bitrate should always be set in 
case of an AC3 stream. If the container does not deliver this 
information then the codec headers need to be parsed.

I would appreciate some comments about this.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: matroska_ac3_needs_parsing_v1.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100210/65faa89b/attachment.txt>

More information about the ffmpeg-devel mailing list