Set next_pts to pts if it is unknown and pkt->dts is not known either. This
[ffmpeg.git] / ffmpeg.c
index 59ce7ca..6a156dc 100644 (file)
--- 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;
 
     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;
     if (pkt == NULL) {
         /* EOF handling */
         ptr = NULL;