提交 10b6a83f 编写于 作者: M Marton Balint 提交者: Michael Niedermayer

lavc/utils: change add_metadata_from_side_data to accept avpacket

Signed-off-by: NMarton Balint <cus@passwd.hu>
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 3a19fe00
......@@ -2296,14 +2296,14 @@ fail:
return AVERROR_INVALIDDATA;
}
static int add_metadata_from_side_data(AVCodecContext *avctx, AVFrame *frame)
static int add_metadata_from_side_data(AVPacket *avpkt, AVFrame *frame)
{
int size;
const uint8_t *side_metadata;
AVDictionary **frame_md = avpriv_frame_get_metadatap(frame);
side_metadata = av_packet_get_side_data(avctx->internal->pkt,
side_metadata = av_packet_get_side_data(avpkt,
AV_PKT_DATA_STRINGS_METADATA, &size);
return av_packet_unpack_dictionary(side_metadata, size, frame_md);
}
......@@ -2406,7 +2406,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
if (picture->format == AV_PIX_FMT_NONE) picture->format = avctx->pix_fmt;
}
}
add_metadata_from_side_data(avctx, picture);
add_metadata_from_side_data(avctx->internal->pkt, picture);
fail:
emms_c(); //needed to avoid an emms_c() call before every return;
......@@ -2548,7 +2548,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
frame->pkt_dts = avpkt->dts;
}
if (ret >= 0 && *got_frame_ptr) {
add_metadata_from_side_data(avctx, frame);
add_metadata_from_side_data(avctx->internal->pkt, frame);
avctx->frame_number++;
av_frame_set_best_effort_timestamp(frame,
guess_correct_pts(avctx,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册