Commit 103d74ea authored by Oded Shimon's avatar Oded Shimon

ff_nut_reset_ts() expected to get 'ts*time_base_count', but muxer only

gave it 'ts'. Fixed by changing ff_nut_reset_ts() and demuxer params

Originally committed as revision 11851 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1db38dad
...@@ -26,7 +26,7 @@ void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ ...@@ -26,7 +26,7 @@ void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
int i; int i;
for(i=0; i<nut->avf->nb_streams; i++){ for(i=0; i<nut->avf->nb_streams; i++){
nut->stream[i].last_pts= av_rescale_rnd( nut->stream[i].last_pts= av_rescale_rnd(
val / nut->time_base_count, val,
time_base.num * (int64_t)nut->stream[i].time_base->den, time_base.num * (int64_t)nut->stream[i].time_base->den,
time_base.den * (int64_t)nut->stream[i].time_base->num, time_base.den * (int64_t)nut->stream[i].time_base->num,
AV_ROUND_DOWN); AV_ROUND_DOWN);
......
...@@ -427,7 +427,7 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr){ ...@@ -427,7 +427,7 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr){
if(*back_ptr < 0) if(*back_ptr < 0)
return -1; return -1;
ff_nut_reset_ts(nut, nut->time_base[tmp % nut->time_base_count], tmp); ff_nut_reset_ts(nut, nut->time_base[tmp % nut->time_base_count], tmp / nut->time_base_count);
if(skip_reserved(bc, end) || get_checksum(bc)){ if(skip_reserved(bc, end) || get_checksum(bc)){
av_log(s, AV_LOG_ERROR, "sync point checksum mismatch\n"); av_log(s, AV_LOG_ERROR, "sync point checksum mismatch\n");
......
...@@ -30,8 +30,8 @@ f8ad5bd78f4d012a8ce9570aa395ac54 *./tests/data/b-libav.flv ...@@ -30,8 +30,8 @@ f8ad5bd78f4d012a8ce9570aa395ac54 *./tests/data/b-libav.flv
2ba41cf880aa5cb87e8a08fdb735398d *./tests/data/b-libav.gxf 2ba41cf880aa5cb87e8a08fdb735398d *./tests/data/b-libav.gxf
814640 ./tests/data/b-libav.gxf 814640 ./tests/data/b-libav.gxf
./tests/data/b-libav.gxf CRC=0xa376c09e ./tests/data/b-libav.gxf CRC=0xa376c09e
b54fe5ee2983506550b4433b63845daf *./tests/data/b-libav.nut 79d92ebd1e760575136fb5f0782d5151 *./tests/data/b-libav.nut
331018 ./tests/data/b-libav.nut 331022 ./tests/data/b-libav.nut
./tests/data/b-libav.nut CRC=0x400c29e9 ./tests/data/b-libav.nut CRC=0x400c29e9
43238b15f1012aa27536c2be20bb2383 *./tests/data/b-libav.mkv 43238b15f1012aa27536c2be20bb2383 *./tests/data/b-libav.mkv
329854 ./tests/data/b-libav.mkv 329854 ./tests/data/b-libav.mkv
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment