aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-01-07 23:07:24 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-01-07 23:07:24 +0000
commit393cbb963b83ecd98336502b1201f16f5eaed979 (patch)
treee644a4a46a2527c4586c475ed2768684c6450466 /ffplay.c
parent060ec0a8294d912f694cf48546f1543805f83a48 (diff)
downloadffmpeg-393cbb963b83ecd98336502b1201f16f5eaed979.tar.gz
Add AVFrame.pkt_pts that contains the correctly reordered AVPacket.pts
Originally committed as revision 26260 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index e0cc305e77..a52ec12b73 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1652,6 +1652,8 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
pic->age = INT_MAX;
pic->type = FF_BUFFER_TYPE_USER;
pic->reordered_opaque = codec->reordered_opaque;
+ if(codec->pkt) pic->pkt_pts = codec->pkt->pts;
+ else pic->pkt_pts = AV_NOPTS_VALUE;
return 0;
}
@@ -1677,6 +1679,8 @@ static int input_reget_buffer(AVCodecContext *codec, AVFrame *pic)
}
pic->reordered_opaque = codec->reordered_opaque;
+ if(codec->pkt) pic->pkt_pts = codec->pkt->pts;
+ else pic->pkt_pts = AV_NOPTS_VALUE;
return 0;
}