changeset 3098:fdcab2321805 libavformat

fix the id CIN demuxer by using the pts API correctly
author melanson
date Sat, 01 Mar 2008 01:43:19 +0000
parents 298c49463701
children b74cbb146e2d
files idcin.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/idcin.c	Sat Mar 01 00:26:19 2008 +0000
+++ b/idcin.c	Sat Mar 01 01:43:19 2008 +0000
@@ -71,7 +71,7 @@
 #include "avformat.h"
 
 #define HUFFMAN_TABLE_SIZE (64 * 1024)
-#define FRAME_PTS_INC (90000 / 14)
+#define IDCIN_FPS 14
 
 typedef struct IdcinDemuxContext {
     int video_stream_index;
@@ -152,7 +152,7 @@
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    av_set_pts_info(st, 33, 1, 90000);
+    av_set_pts_info(st, 33, 1, IDCIN_FPS);
     idcin->video_stream_index = st->index;
     st->codec->codec_type = CODEC_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_IDCIN;
@@ -175,7 +175,7 @@
         st = av_new_stream(s, 0);
         if (!st)
             return AVERROR(ENOMEM);
-        av_set_pts_info(st, 33, 1, 90000);
+        av_set_pts_info(st, 33, 1, IDCIN_FPS);
         idcin->audio_stream_index = st->index;
         st->codec->codec_type = CODEC_TYPE_AUDIO;
         st->codec->codec_tag = 1;
@@ -271,7 +271,7 @@
         pkt->pts = idcin->pts;
 
         idcin->current_audio_chunk ^= 1;
-        idcin->pts += FRAME_PTS_INC;
+        idcin->pts++;
     }
 
     if (idcin->audio_present)