It is not supposed to be changed from outside of lavc. Set the stream timebase and average framerate instead.tags/n2.3
| @@ -21,6 +21,7 @@ | |||||
| #include "libavutil/intreadwrite.h" | #include "libavutil/intreadwrite.h" | ||||
| #include "avformat.h" | #include "avformat.h" | ||||
| #include "internal.h" | |||||
| #define TXD_FILE 0x16 | #define TXD_FILE 0x16 | ||||
| #define TXD_INFO 0x01 | #define TXD_INFO 0x01 | ||||
| @@ -45,8 +46,8 @@ static int txd_read_header(AVFormatContext *s) { | |||||
| return AVERROR(ENOMEM); | return AVERROR(ENOMEM); | ||||
| st->codec->codec_type = AVMEDIA_TYPE_VIDEO; | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; | ||||
| st->codec->codec_id = AV_CODEC_ID_TXD; | 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 */ | /* the parameters will be extracted from the compressed bitstream */ | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| @@ -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 | |||||
| @@ -1,2 +1,2 @@ | |||||
| #tb 0: 1/90000 | |||||
| 0, 0, 0, 0, 786432, 0x56654d61 | |||||
| #tb 0: 1/5 | |||||
| 0, 0, 0, 1, 786432, 0x56654d61 | |||||