|
|
|
@ -344,6 +344,8 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ |
|
|
|
|
} |
|
|
|
|
s->internal_buffer_count++; |
|
|
|
|
|
|
|
|
|
if(s->pkt) pic->pkt_pts= s->pkt->pts; |
|
|
|
|
else pic->pkt_pts= AV_NOPTS_VALUE; |
|
|
|
|
pic->reordered_opaque= s->reordered_opaque; |
|
|
|
|
|
|
|
|
|
if(s->debug&FF_DEBUG_BUFFERS) |
|
|
|
@ -628,6 +630,9 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi |
|
|
|
|
*got_picture_ptr= 0; |
|
|
|
|
if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx)) |
|
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
avctx->pkt = avpkt; |
|
|
|
|
|
|
|
|
|
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){ |
|
|
|
|
ret = avctx->codec->decode(avctx, picture, got_picture_ptr, |
|
|
|
|
avpkt); |
|
|
|
@ -662,6 +667,8 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa |
|
|
|
|
{ |
|
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
avctx->pkt = avpkt; |
|
|
|
|
|
|
|
|
|
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){ |
|
|
|
|
//FIXME remove the check below _after_ ensuring that all audio check that the available space is enough
|
|
|
|
|
if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){ |
|
|
|
@ -703,6 +710,7 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, |
|
|
|
|
{ |
|
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
avctx->pkt = avpkt; |
|
|
|
|
*got_sub_ptr = 0; |
|
|
|
|
ret = avctx->codec->decode(avctx, sub, got_sub_ptr, avpkt); |
|
|
|
|
if (*got_sub_ptr) |
|
|
|
|