summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-02-26 13:15:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-02-26 13:15:22 +0000
commit34583e1bbe3fd233a32e4a17421358e8c1853702 (patch)
tree8b781eacb33773bb0182ec43bdd38fc21b8942de /ffmpeg.c
parentd9fc9ff31bcc94f52cccd4b5a3d763d36bc70a8f (diff)
Fix next_pts computation to consider repeat_pict.
Originally committed as revision 17613 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 79ad1a4263..f757eb5019 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1261,8 +1261,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
goto discard_packet;
}
if (ist->st->codec->time_base.num != 0) {
+ int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : 1;
ist->next_pts += ((int64_t)AV_TIME_BASE *
- ist->st->codec->time_base.num) /
+ ist->st->codec->time_base.num * ticks) /
ist->st->codec->time_base.den;
}
len = 0;
@@ -1289,8 +1290,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
break;
case CODEC_TYPE_VIDEO:
if (ist->st->codec->time_base.num != 0) {
+ int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : 1;
ist->next_pts += ((int64_t)AV_TIME_BASE *
- ist->st->codec->time_base.num) /
+ ist->st->codec->time_base.num * ticks) /
ist->st->codec->time_base.den;
}
break;