[FFmpeg-devel] [PATCH] Detect DNET/byte-swapped AC-3 and support decoding it directly.
Thu Mar 10 22:40:39 CET 2011
On Sun, Mar 06, 2011 at 11:58:36AM -0500, Justin Ruggles wrote:
> > I'll send an updated patch, however I think that code is completely
> > broken.
> > The only reason for that copy as I understand it is to avoid a crash.
> > I don't consider it reasonable for a codec to crash.
> > That is not to mention that it seems nonsense to depend on
> > error_recognition, this has nothing at all to do with whether
> > errors are recognized, I would suspect this is a leftover from
> > the time when this was called error_resilience and it meaning was misunderstood.
> I agree. The use does not seem to fit in with the meaning of that
> field. The purpose was to avoid a crash without having to add many
> buffer size checks throughout the code. Since the maximum read amount
> based solely on decoded elements from the bitstream is a known fixed
> value, it is more efficient to prevent buffer overread this way.
> I think removing the error_recognition condition would be fine.
Let's leave that change to a separate patch, I don't think we
should cram that into a not really related functionality.
It would make the commit message even more unwieldy :-)
More information about the ffmpeg-devel