]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dvbsub_parser.c
Fix raw rgb/bgr vertical flip in avi based on info from http://www.fourcc.org/fccbihg...
[ffmpeg] / libavcodec / dvbsub_parser.c
index 459f6cccd643673efd24fe1c28be61c123cb625a..96381df10ea29d1f4e7b50540df7993eac25c265 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * DVB subtitle parser for FFmpeg
- * Copyright (c) 2005 Ian Caulfield.
+ * Copyright (c) 2005 Ian Caulfield
  *
  * This file is part of FFmpeg.
  *
@@ -80,7 +80,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
 
     s->fetch_timestamp = 1;
 
-    if (s->last_pts != s->pts && s->last_pts != AV_NOPTS_VALUE) /* Start of a new packet */
+    if (s->last_pts != s->pts && s->pts != AV_NOPTS_VALUE) /* Start of a new packet */
     {
         if (pc->packet_index != pc->packet_start)
         {
@@ -175,8 +175,8 @@ static int dvbsub_parse(AVCodecParserContext *s,
         pc->packet_start = *poutbuf_size;
     }
 
-    if (s->last_pts == AV_NOPTS_VALUE)
-        s->last_pts = s->pts;
+    if (s->pts == AV_NOPTS_VALUE)
+        s->pts = s->last_pts;
 
     return buf_size;
 }