[FFmpeg-cvslog] r17613 - trunk/ffmpeg.c

michael subversion
Thu Feb 26 14:15:23 CET 2009


Author: michael
Date: Thu Feb 26 14:15:22 2009
New Revision: 17613

Log:
Fix next_pts computation to consider repeat_pict.

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Thu Feb 26 14:13:48 2009	(r17612)
+++ trunk/ffmpeg.c	Thu Feb 26 14:15:22 2009	(r17613)
@@ -1261,8 +1261,9 @@ static int output_packet(AVInputStream *
                         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 *
                 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;




More information about the ffmpeg-cvslog mailing list