mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
libavcodec: correct consumed bytes for decoders
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user