diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-21 20:12:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-21 20:34:32 +0200 |
commit | a1bb0823a96ee2d94c7c2f8080313e744ffbff5f (patch) | |
tree | 7d21a2efb78ea8e1e79c7d9c5d166d5f3170bf0b | |
parent | 307562be98b49b94a621d5fbf7db7ab53308db87 (diff) | |
download | ffmpeg-a1bb0823a96ee2d94c7c2f8080313e744ffbff5f.tar.gz |
libavcodec: correct consumed bytes for decoders
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/utils.c | 10 | ||||
-rw-r--r-- | tests/fate/audio.mak | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 3a858b919f..15dd05ac34 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1482,8 +1482,11 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi emms_c(); //needed to avoid an emms_c() call before every return; avctx->pkt = NULL; - if (did_split) + if (did_split) { ff_packet_free_side_data(&tmp); + if(ret == tmp.size) + ret = avpkt->size; + } if (*got_picture_ptr){ avctx->frame_number++; @@ -1583,8 +1586,11 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, } avctx->pkt = NULL; - if (did_split) + if (did_split) { ff_packet_free_side_data(&tmp); + if(ret == tmp.size) + ret = avpkt->size; + } } return ret; } diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 33356da3c6..5cf457ef34 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -40,10 +40,8 @@ fate-nellymoser-aref-encode: CMD = enc_dec_pcm flv wav s16le $(REF) -c:a nellymo fate-nellymoser-aref-encode: CMP = stddev fate-nellymoser-aref-encode: REF = ./tests/data/acodec-16000-1.ref.wav fate-nellymoser-aref-encode: CMP_SHIFT = -1172 -#fate-nellymoser-aref-encode: CMP_TARGET = 9617 -#fate-nellymoser-aref-encode: SIZE_TOLERANCE = 268 -fate-nellymoser-aref-encode: CMP_TARGET = 10216 -fate-nellymoser-aref-encode: SIZE_TOLERANCE = 1300 +fate-nellymoser-aref-encode: CMP_TARGET = 9617 +fate-nellymoser-aref-encode: SIZE_TOLERANCE = 268 FATE_SAMPLES_AUDIO += fate-sierra-vmd-audio fate-sierra-vmd-audio: CMD = framecrc -i $(SAMPLES)/vmd/12.vmd -vn |