[FFmpeg-devel] [PATCH] Ac3/AAC parser: remove incomplete first frames
Reimar Döffinger
Reimar.Doeffinger
Mon Jan 25 00:33:02 CET 2010
On Sun, Jan 24, 2010 at 05:13:53PM -0500, Justin Ruggles wrote:
> >> For AC-3, if the partial frame is out of sync, the decoder will
> >> print/return a frame sync error and skip the partial frame. If it is
> >> synced but only partial (e.g. truncated stream) it will decode any
> >> complete blocks and use use error concealment for the truncated blocks.
> >
> > I can't really see where the code would check for being in sync?
>
> ac3dec.c:1237
> err = parse_frame_header(s);
> ...
> switch(err) {
> case AAC_AC3_PARSE_ERROR_SYNC:
> av_log(avctx, AV_LOG_ERROR, "frame sync error\n");
> return -1;
That can't work, this error value will be overwritten by the frame size check.
More information about the ffmpeg-devel
mailing list