aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2011-01-30 20:18:31 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-02-07 19:32:07 +0100
commit76ad67cae751658ce2d84e83b38a4d673e9e85a3 (patch)
treefd7a80906aa640e700f427539a9c87dd2d27b5c0 /ffmpeg.c
parent52b2e95cd9f829b83b879a0694173d4ef1558c46 (diff)
downloadffmpeg-76ad67cae751658ce2d84e83b38a4d673e9e85a3.tar.gz
Implement guessed_pts in avcodec_decode_video2
Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index dfd9f9ada0..379ac0441a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -320,7 +320,6 @@ typedef struct AVInputStream {
int64_t next_pts; /* synthetic pts for cases where pkt.pts
is not defined */
int64_t pts; /* current pts */
- PtsCorrectionContext pts_ctx;
int is_start; /* is 1 at the start and after a discontinuity */
int showed_multi_packet_warning;
int is_past_recording_time;
@@ -1561,7 +1560,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.pkt_pts, picture.pkt_dts);
+ ist->next_pts = ist->pts = picture.best_effort_timestamp;
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 *
@@ -2364,7 +2363,6 @@ static int transcode(AVFormatContext **output_files,
st= ist->st;
ist->pts = st->avg_frame_rate.num ? - st->codec->has_b_frames*AV_TIME_BASE / av_q2d(st->avg_frame_rate) : 0;
ist->next_pts = AV_NOPTS_VALUE;
- init_pts_correction(&ist->pts_ctx);
ist->is_start = 1;
}