diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-01 22:59:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-01 22:59:59 +0200 |
commit | 2ff81d09160626d0c7919a0db73a9428abe2cef1 (patch) | |
tree | bead8d0a50f63ce81450aba5be6ef52d4961e42f /libavcodec/utils.c | |
parent | bbc604020fac64a42f54320876cac6844f3b100d (diff) | |
download | ffmpeg-2ff81d09160626d0c7919a0db73a9428abe2cef1.tar.gz |
avcodec/utils/ff_init_buffer_info factor avctx->internal->pkt; out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 444b9b2d34..b899392fcc 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -747,17 +747,19 @@ FF_ENABLE_DEPRECATION_WARNINGS int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame) { - if (avctx->internal->pkt) { + AVPacket *pkt = avctx->internal->pkt; + + if (pkt) { uint8_t *packet_sd; AVFrameSideData *frame_sd; int size; - 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); + frame->pkt_pts = pkt->pts; + av_frame_set_pkt_pos (frame, pkt->pos); + av_frame_set_pkt_duration(frame, pkt->duration); + av_frame_set_pkt_size (frame, pkt->size); /* copy the replaygain data to the output frame */ - packet_sd = av_packet_get_side_data(avctx->internal->pkt, AV_PKT_DATA_REPLAYGAIN, &size); + packet_sd = av_packet_get_side_data(pkt, AV_PKT_DATA_REPLAYGAIN, &size); if (packet_sd) { frame_sd = av_frame_new_side_data(frame, AV_FRAME_DATA_REPLAYGAIN, size); if (!frame_sd) |