Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-08 10:56:53 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-02-08 11:01:20 +0400
commite806ceaa7b41ebacea94eab03ec6daaad2cd4f43 (patch)
tree740220af9ed460048133d81e195172dac49d1c0e /ffmpeg.c
parentf070bf089454bf0e93f30343628b7761e9a68ddb (diff)
ffmpeg: Use the correct (dts) variables for stream copy.
Strongly based on Anton Khirnovs code. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index e277eea23a..74529d6892 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2297,18 +2297,18 @@ static int output_packet(InputStream *ist,
/* handle stream copy */
if (!ist->decoding_needed) {
rate_emu_sleep(ist);
- ist->pts = ist->next_pts;
+ ist->dts = ist->next_dts;
switch (ist->st->codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
- ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) /
+ ist->next_dts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) /
ist->st->codec->sample_rate;
break;
case AVMEDIA_TYPE_VIDEO:
if (pkt->duration) {
- ist->next_pts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
+ ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
} else 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 *
+ ist->next_dts += ((int64_t)AV_TIME_BASE *
ist->st->codec->time_base.num * ticks) /
ist->st->codec->time_base.den;
}