Mercurial > libavformat.hg
comparison mpeg.c @ 463:696f41bc8784 libavformat
store index for seeking in the native timebase of each stream
set correct timebase for nut
merge mpeg-ts seeking with existing seeking code
10l fix in mpegts (27mhz vs. 90khz)
author | michael |
---|---|
date | Sun, 23 May 2004 16:26:12 +0000 |
parents | 11d07f14b077 |
children | 40069a91d1a0 |
comparison
equal
deleted
inserted
replaced
462:b69898ffc92a | 463:696f41bc8784 |
---|---|
1310 } | 1310 } |
1311 if(dts != AV_NOPTS_VALUE && ppos){ | 1311 if(dts != AV_NOPTS_VALUE && ppos){ |
1312 int i; | 1312 int i; |
1313 for(i=0; i<s->nb_streams; i++){ | 1313 for(i=0; i<s->nb_streams; i++){ |
1314 if(startcode == s->streams[i]->id) { | 1314 if(startcode == s->streams[i]->id) { |
1315 av_add_index_entry(s->streams[i], *ppos, dts*AV_TIME_BASE/90000, 0, 0 /* FIXME keyframe? */); | 1315 av_add_index_entry(s->streams[i], *ppos, dts, 0, 0 /* FIXME keyframe? */); |
1316 } | 1316 } |
1317 } | 1317 } |
1318 } | 1318 } |
1319 | 1319 |
1320 *pstart_code = startcode; | 1320 *pstart_code = startcode; |
1428 } | 1428 } |
1429 #ifdef DEBUG_SEEK | 1429 #ifdef DEBUG_SEEK |
1430 printf("pos=0x%llx dts=0x%llx %0.3f\n", pos, dts, dts / 90000.0); | 1430 printf("pos=0x%llx dts=0x%llx %0.3f\n", pos, dts, dts / 90000.0); |
1431 #endif | 1431 #endif |
1432 *ppos = pos; | 1432 *ppos = pos; |
1433 return dts*AV_TIME_BASE/90000; | 1433 return dts; |
1434 } | 1434 } |
1435 | 1435 |
1436 #ifdef CONFIG_ENCODERS | 1436 #ifdef CONFIG_ENCODERS |
1437 static AVOutputFormat mpeg1system_mux = { | 1437 static AVOutputFormat mpeg1system_mux = { |
1438 "mpeg", | 1438 "mpeg", |