Merge commit '87a051f97633010f71dfc1d23d806856499bf231'

* commit '87a051f97633010f71dfc1d23d806856499bf231':
  lavc: allow asynchronous decoders to return correct pkt_dts values

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
Hendrik Leppkes
2015-09-12 13:30:33 +02:00
3 changed files with 10 additions and 2 deletions

View File

@@ -2095,7 +2095,8 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
else {
ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
&tmp);
picture->pkt_dts = avpkt->dts;
if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
picture->pkt_dts = avpkt->dts;
if(!avctx->has_b_frames){
av_frame_set_pkt_pos(picture, avpkt->pos);