[FFmpeg-devel] [PATCH] ac3 parser incorrectly sets frame_size to samples*channel

elupus elupus
Fri Feb 20 18:29:58 CET 2009


Hi, 

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.

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ac3parser.patch
Type: text/x-patch
Size: 493 bytes
Desc: Attached file: ac3parser.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090220/7c4191c8/attachment.bin>



More information about the ffmpeg-devel mailing list