X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmpegaudiodec_template.c;h=0f32ac7b515d194c14b7d6a0e2026262e0d86c8e;hb=cda503a1b92c776cd197ec5a8879b793d9deaad8;hp=b7b9dbdfee05dc4cc1772493fe3adfc1241b2ab9;hpb=8f80f3d074d8e9e5b20a7f7aa5010d387689edf3;p=ffmpeg diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c index b7b9dbdfee0..0f32ac7b515 100644 --- a/libavcodec/mpegaudiodec_template.c +++ b/libavcodec/mpegaudiodec_template.c @@ -1657,9 +1657,11 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, uint32_t header; int ret; + int skipped = 0; while(buf_size && !*buf){ buf++; buf_size--; + skipped++; } if (buf_size < HEADER_SIZE) @@ -1714,7 +1716,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, return ret; } s->frame_size = 0; - return buf_size; + return buf_size + skipped; } static void mp_flush(MPADecodeContext *ctx)