diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-04 11:41:55 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-04 11:41:55 +0100 |
commit | ab71be091206a2264f3a8862215fc284bb8e6274 (patch) | |
tree | 1634753965d201a33f583097660958548cce3106 /libavcodec/utils.c | |
parent | 3fc26d8073a49c96a0704015ce18f5317d87a739 (diff) | |
parent | da6506c607eda585ba4b15430cf3c9a2ce09c3a9 (diff) | |
download | ffmpeg-ab71be091206a2264f3a8862215fc284bb8e6274.tar.gz |
Merge commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9'
* commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9':
lavc: move AVCodecContext.pkt to AVCodecInternal
Conflicts:
libavcodec/internal.h
libavcodec/rawdec.c
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 92374f4888..17ca9c782b 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -729,11 +729,11 @@ FF_ENABLE_DEPRECATION_WARNINGS int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame) { - if (avctx->pkt) { - frame->pkt_pts = avctx->pkt->pts; - av_frame_set_pkt_pos (frame, avctx->pkt->pos); - av_frame_set_pkt_duration(frame, avctx->pkt->duration); - av_frame_set_pkt_size (frame, avctx->pkt->size); + if (avctx->internal->pkt) { + frame->pkt_pts = avctx->internal->pkt->pts; + av_frame_set_pkt_pos (frame, avctx->internal->pkt->pos); + av_frame_set_pkt_duration(frame, avctx->internal->pkt->duration); + av_frame_set_pkt_size (frame, avctx->internal->pkt->size); } else { frame->pkt_pts = AV_NOPTS_VALUE; av_frame_set_pkt_pos (frame, -1); @@ -2026,7 +2026,7 @@ static int add_metadata_from_side_data(AVCodecContext *avctx, AVFrame *frame) const uint8_t *side_metadata; const uint8_t *end; - side_metadata = av_packet_get_side_data(avctx->pkt, + side_metadata = av_packet_get_side_data(avctx->internal->pkt, AV_PKT_DATA_STRINGS_METADATA, &size); if (!side_metadata) goto end; @@ -2084,7 +2084,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi goto fail; } - avctx->pkt = &tmp; + avctx->internal->pkt = &tmp; if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME) ret = ff_thread_decode_frame(avctx, picture, got_picture_ptr, &tmp); @@ -2110,7 +2110,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi fail: emms_c(); //needed to avoid an emms_c() call before every return; - avctx->pkt = NULL; + avctx->internal->pkt = NULL; if (did_split) { av_packet_free_side_data(&tmp); if(ret == tmp.size) @@ -2233,7 +2233,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, goto fail; } - avctx->pkt = &tmp; + avctx->internal->pkt = &tmp; if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME) ret = ff_thread_decode_frame(avctx, frame, got_frame_ptr, &tmp); else { @@ -2257,7 +2257,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, frame->sample_rate = avctx->sample_rate; } - side= av_packet_get_side_data(avctx->pkt, AV_PKT_DATA_SKIP_SAMPLES, &side_size); + side= av_packet_get_side_data(avctx->internal->pkt, AV_PKT_DATA_SKIP_SAMPLES, &side_size); if(side && side_size>=10) { avctx->internal->skip_samples = AV_RL32(side); av_log(avctx, AV_LOG_DEBUG, "skip %d samples due to side data\n", @@ -2312,7 +2312,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, } } fail: - avctx->pkt = NULL; + avctx->internal->pkt = NULL; if (did_split) { av_packet_free_side_data(&tmp); if(ret == tmp.size) @@ -2454,7 +2454,7 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, if (ret < 0) { *got_sub_ptr = 0; } else { - avctx->pkt = &pkt_recoded; + avctx->internal->pkt = &pkt_recoded; if (avctx->pkt_timebase.den && avpkt->pts != AV_NOPTS_VALUE) sub->pts = av_rescale_q(avpkt->pts, @@ -2491,7 +2491,7 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, sub->format = 0; else if (avctx->codec_descriptor->props & AV_CODEC_PROP_TEXT_SUB) sub->format = 1; - avctx->pkt = NULL; + avctx->internal->pkt = NULL; } if (did_split) { |