aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorAlexander Strange <astrange@ithinksw.com>2011-02-05 00:28:24 -0500
committerMichael Niedermayer <michaelni@gmx.at>2011-02-06 20:31:45 +0100
commitfd0ae17aafd7adb7619a02c6ec6835aa0ccbfea4 (patch)
tree08eec208e4540b01c4ef9edb88eed20230867b4f /ffmpeg.c
parent105ba7dc284e13ebaa87cbd1eb6f0650c939f0e7 (diff)
downloadffmpeg-fd0ae17aafd7adb7619a02c6ec6835aa0ccbfea4.tar.gz
Adopt pkt_dts/pkt_pts in lavc clients
No behavior change; this makes DTS reliable with the next patch. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 6b474953975fd8ea64d1ed4d09c42b2d8e787c6f)
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 10934e99b1..aae93f2644 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1549,7 +1549,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
/* XXX: allocate picture correctly */
avcodec_get_frame_defaults(&picture);
- ist->st->codec->reordered_opaque = pkt_pts;
+ avpkt.pts = pkt_pts;
+ avpkt.dts = ist->pts;
pkt_pts = AV_NOPTS_VALUE;
ret = avcodec_decode_video2(ist->st->codec,
@@ -1561,7 +1562,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
/* no picture yet */
goto discard_packet;
}
- ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, picture.reordered_opaque, ist->pts);
+ ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, picture.pkt_pts, picture.pkt_dts);
if (ist->st->codec->time_base.num != 0) {
int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
ist->next_pts += ((int64_t)AV_TIME_BASE *