forked from FFmpeg/FFmpeg
aaclatm: Eliminate dummy packets due to muxlength calculation.
Muxlength does not include the 3 bytes of AudioSyncStream() before the AudioMuxElement(). If these three bytes are not accounted for the last three bytes of the LATM packet are sent back to the decoder again. Fixes issue244/mux2.share.ts Originally committed as revision 25685 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
c77549c510
commit
ebb7f7de82
1 changed files with 2 additions and 2 deletions
|
@ -2310,9 +2310,9 @@ static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size,
|
||||||
if (get_bits(&gb, 11) != LOAS_SYNC_WORD)
|
if (get_bits(&gb, 11) != LOAS_SYNC_WORD)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
muxlength = get_bits(&gb, 13);
|
muxlength = get_bits(&gb, 13) + 3;
|
||||||
// not enough data, the parser should have sorted this
|
// not enough data, the parser should have sorted this
|
||||||
if (muxlength+3 > avpkt->size)
|
if (muxlength > avpkt->size)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if ((err = read_audio_mux_element(latmctx, &gb)) < 0)
|
if ((err = read_audio_mux_element(latmctx, &gb)) < 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue