[SCM] libav/experimental: txd: do not set the codec timebase.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:02:53 UTC 2014


The following commit has been merged in the experimental branch:
commit a4ed995cabf220029f1d0e185a6fb45eed7b4091
Author: Anton Khirnov <anton at khirnov.net>
Date:   Sun Apr 13 10:43:45 2014 +0200

    txd: do not set the codec timebase.
    
    It is not supposed to be changed from outside of lavc.
    Set the stream timebase and average framerate instead.

diff --git a/libavformat/txd.c b/libavformat/txd.c
index 5897881..e6522c3 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -21,6 +21,7 @@
 
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
+#include "internal.h"
 
 #define TXD_FILE            0x16
 #define TXD_INFO            0x01
@@ -45,8 +46,8 @@ static int txd_read_header(AVFormatContext *s) {
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = AV_CODEC_ID_TXD;
-    st->codec->time_base.den = 5;
-    st->codec->time_base.num = 1;
+    avpriv_set_pts_info(st, 64, 1, 5);
+    st->avg_frame_rate = av_inv_q(st->time_base);
     /* the parameters will be extracted from the compressed bitstream */
     return 0;
 }
diff --git a/tests/ref/fate/txd-16bpp b/tests/ref/fate/txd-16bpp
index 3a23c0b..9522873 100644
--- a/tests/ref/fate/txd-16bpp
+++ b/tests/ref/fate/txd-16bpp
@@ -1,12 +1,12 @@
-#tb 0: 1/90000
-0,          0,          0,        0,    16384, 0x213f9ea8
-0,      18000,      18000,        0,    16384, 0x8185fdb1
-0,      36000,      36000,        0,    16384, 0xf03581d1
-0,      54000,      54000,        0,    16384, 0x629cd573
-0,      72000,      72000,        0,    16384, 0xfe7a5b63
-0,      90000,      90000,        0,    16384, 0x4afc05b2
-0,     108000,     108000,        0,    16384, 0x074b8515
-0,     126000,     126000,        0,    16384, 0x17fde900
-0,     144000,     144000,        0,    16384, 0x831bac76
-0,     162000,     162000,        0,    16384, 0x2fb579f3
-0,     180000,     180000,        0,    16384, 0x68762bed
+#tb 0: 1/5
+0,          0,          0,        1,    16384, 0x213f9ea8
+0,          1,          1,        1,    16384, 0x8185fdb1
+0,          2,          2,        1,    16384, 0xf03581d1
+0,          3,          3,        1,    16384, 0x629cd573
+0,          4,          4,        1,    16384, 0xfe7a5b63
+0,          5,          5,        1,    16384, 0x4afc05b2
+0,          6,          6,        1,    16384, 0x074b8515
+0,          7,          7,        1,    16384, 0x17fde900
+0,          8,          8,        1,    16384, 0x831bac76
+0,          9,          9,        1,    16384, 0x2fb579f3
+0,         10,         10,        1,    16384, 0x68762bed
diff --git a/tests/ref/fate/txd-pal8 b/tests/ref/fate/txd-pal8
index 3f0aab2..61fee80 100644
--- a/tests/ref/fate/txd-pal8
+++ b/tests/ref/fate/txd-pal8
@@ -1,2 +1,2 @@
-#tb 0: 1/90000
-0,          0,          0,        0,   786432, 0x56654d61
+#tb 0: 1/5
+0,          0,          0,        1,   786432, 0x56654d61

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list