[FFmpeg-devel] [PATCH] ac3_parser type punning fix
Michael Niedermayer
michaelni
Sun Oct 19 23:31:04 CEST 2008
On Sun, Oct 19, 2008 at 12:26:31PM -0700, Baptiste Coudurier wrote:
> Hi guys,
>
> Michael Niedermayer wrote:
> > On Sun, Oct 19, 2008 at 05:23:52PM +0100, M?ns Rullg?rd wrote:
> >> Michael Niedermayer <michaelni at gmx.at> writes:
[...]
> >> Looking at the code, I see one significant difference between
> >> aac_sync() and ac3_sync(). Whereas aac_sync() only calls inlined
> >> get_bits() functions (meaning gcc can know exactly what accesses are
> >> happening), ac3_sync() calls another function to do the parsing. In
> >> light of this, I agree it's unlikely that gcc is able to exploit any
> >> aliasing tricks. The disassembly above also suggests that something
> >> more sinister is afoot here.
> >>
> >> The change to aac_sync() fixed a real aliasing violation, and I
> >> verified the assembler before and after the change. This seems to be
> >> a bit different.
> >
>
> FYI, Mans and I talked about this issue some time ago, and then I filled
> a roundup issue regarding this (raw aac playback is broken)
i cant find that issue, do you maybe know its number or a search term that
works?
>
> Even at r15647 raw aac is still borken because the parser is still broken.
i dont know about the parser but raw aac is broken because
the aac decoder does
if (avccontext->extradata_size <= 0 ||
decode_audio_specific_config(ac, avccontext->extradata, avccontext->extradata_size))
return -1;
and nothing in raw.c nor in the parser sets extradata, nor is there a
AVCodecParser.split() that would cause extradata to be set.
Thats also why aac in mpeg-ts does not work ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081019/fc65b31d/attachment.pgp>
More information about the ffmpeg-devel
mailing list