summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-02-17 19:08:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-02-17 19:08:15 +0000
commited9238593e4b030e0a27ab6b4279d90d5b017fb2 (patch)
tree8020a1aecc447f93f2f26c3eee8cb44974ba222a /ffmpeg.c
parentb1b818fce82dd9acd0493321b3857d329408add9 (diff)
Set next_pts to pts if it is unknown and pkt->dts is not known either. This
is needed because next_pts is used to calculate the next pts and adding to AV_NOPTS_VALUE does not achieve the intended result. Originally committed as revision 12132 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 59ce7caa69..6a156dc4d6 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1055,6 +1055,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
AVSubtitle subtitle, *subtitle_to_free;
int got_subtitle;
+ if(ist->next_pts == AV_NOPTS_VALUE)
+ ist->next_pts= ist->pts;
+
if (pkt == NULL) {
/* EOF handling */
ptr = NULL;