提交 28550804 编写于 作者: S Stefano Sabatini 提交者: Mans Rullgard

In ffplay:get_video_frame(), use frame->pkt_pts rather than reordered_opaque.

AVCodecContext.reordered_opaque is deprecated for this specific use.
Signed-off-by: NMans Rullgard <mans@mansr.com>
上级 13156f40
...@@ -1570,16 +1570,15 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke ...@@ -1570,16 +1570,15 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
return 0; return 0;
} }
is->video_st->codec->reordered_opaque = pkt->pts;
len1 = avcodec_decode_video2(is->video_st->codec, len1 = avcodec_decode_video2(is->video_st->codec,
frame, &got_picture, frame, &got_picture,
pkt); pkt);
if (got_picture) { if (got_picture) {
if (decoder_reorder_pts == -1) { if (decoder_reorder_pts == -1) {
*pts = guess_correct_pts(&is->pts_ctx, frame->reordered_opaque, pkt->dts); *pts = guess_correct_pts(&is->pts_ctx, frame->pkt_pts, pkt->dts);
} else if (decoder_reorder_pts) { } else if (decoder_reorder_pts) {
*pts = frame->reordered_opaque; *pts = frame->pkt_pts;
} else { } else {
*pts = pkt->dts; *pts = pkt->dts;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册