diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-02-10 03:36:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-02-10 03:36:12 +0000 |
commit | 559a55ad5249293186f933749e3767f448b5d2d3 (patch) | |
tree | c4ba8868f8c2627f4875e0c5e23d60660bda999e /libavformat/asf.c | |
parent | 6ff9b4226b0e81d754dfcf1587e859da90aa76c9 (diff) | |
download | ffmpeg-streaming-559a55ad5249293186f933749e3767f448b5d2d3.zip ffmpeg-streaming-559a55ad5249293186f933749e3767f448b5d2d3.tar.gz |
use dvr-ms timestamps
Originally committed as revision 7905 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 81917eb..5f4f6c6 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -600,6 +600,7 @@ static int asf_read_frame_header(AVFormatContext *s){ ByteIOContext *pb = &s->pb; int rsize = 1; int num = get_byte(pb); + int64_t ts0, ts1; asf->packet_segments--; asf->packet_key_frame = num >> 7; @@ -616,7 +617,20 @@ static int asf_read_frame_header(AVFormatContext *s){ return -1; } asf->packet_frag_timestamp = get_le32(pb); // timestamp - url_fskip(pb, asf->packet_replic_size - 8); + if(asf->packet_replic_size >= 8+38+4){ +// for(i=0; i<asf->packet_replic_size-8; i++) +// av_log(s, AV_LOG_DEBUG, "%02X ",get_byte(pb)); +// av_log(s, AV_LOG_DEBUG, "\n"); + url_fskip(pb, 10); + ts0= get_le64(pb); + ts1= get_le64(pb); + url_fskip(pb, 12); + get_le32(pb); + url_fskip(pb, asf->packet_replic_size - 8 - 38 - 4); + if(ts0!= -1) asf->packet_frag_timestamp= ts0/10000; + else asf->packet_frag_timestamp= AV_NOPTS_VALUE; + }else + url_fskip(pb, asf->packet_replic_size - 8); rsize += asf->packet_replic_size; // FIXME - check validity } else if (asf->packet_replic_size==1){ // multipacket - frag_offset is begining timestamp |