summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-14 04:24:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-14 04:24:00 +0200
commit744bd8d08c18d68d92ead091c7e335b4b07459aa (patch)
tree440bae8e7053ed98fc53747bf53317c98d18b918
parentaa32971d2bd760228da1f3a6872731afda8d4523 (diff)
ffmpeg: set pkt_timebase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index c9f2a61d4d..4afc55b40c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2357,6 +2357,7 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
else
avcodec_get_frame_defaults(ist->decoded_frame);
decoded_frame = ist->decoded_frame;
+ av_codec_set_pkt_timebase(avctx, ist->st->time_base);
update_benchmark(NULL);
ret = avcodec_decode_audio4(avctx, decoded_frame, got_output, pkt);
@@ -2476,6 +2477,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
avcodec_get_frame_defaults(ist->decoded_frame);
decoded_frame = ist->decoded_frame;
pkt->dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ist->st->time_base);
+ av_codec_set_pkt_timebase(ist->st->codec, ist->st->time_base);
update_benchmark(NULL);
ret = avcodec_decode_video2(ist->st->codec,