AC3 bitrate not set if container is Matroska / issue 807
Hi, 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. Regards, Christian
On Wed, Feb 10, 2010 at 10:52:32AM +0100, Christian Cier-Zniewski wrote:
Hi,
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.
iam ok with a generic solution in utils.c [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus
participants (2)
-
christian.cier@tu-dortmund.de -
michaelni@gmx.at