[FFmpeg-devel] [PATCH] ac3 parser incorrectly sets frame_size to samples*channel
Fri Feb 20 18:29:58 CET 2009
I noticed while playing a EAC3 file from an mpegts with only sporadic
timestamps that the dts/pts output from libavformat would revert backwords
every few samples.
It seems get_audio_frame_size in utils.c uses AVCodecContext->frame_size to
get the number of samples timewise in a packet (read no total per packet).
However the ac3 parser sets frame_size to be AC3_FRAME_SIZE which includes
all the 6 channels of samples.
Setting the frame_size to 256 (ie 256 for each channel in the stream) fixes
this stream's odd dts/pts output.
The sample that would have shown this is HDDVD.DTSHD.DDPlus.ts which was
uploaded to incoming a while back, but it seems justin didn't find that
sample anymore. Maybe it was pruned or something.
I seem to have ditched this sample aswell. But could probably cut up a new
one from my rip.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 493 bytes
Desc: Attached file: ac3parser.patch
More information about the ffmpeg-devel