diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-03-18 17:58:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-18 17:58:58 +0100 |
commit | 4eb41d16bee406d1481d412639230510015ea708 (patch) | |
tree | c6fa80c3b060c6a71c43082802974163c911663b /libavformat | |
parent | 12bcfe05b45175cc7fc5cc719392c35ee5a3c39c (diff) | |
parent | 350785a6621529c50771f4e7043b4d159a96ed26 (diff) | |
download | ffmpeg-4eb41d16bee406d1481d412639230510015ea708.tar.gz |
Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/asfdec.c | 3 | ||||
-rw-r--r-- | libavformat/avformat.h | 2 | ||||
-rw-r--r-- | libavformat/nutenc.c | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 7d08e6ebcf..cdde5ae3e9 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -235,6 +235,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) if (!asf_st) return AVERROR(ENOMEM); st->priv_data = asf_st; + st->start_time = 0; start_time = asf->hdr.preroll; asf_st->stream_language_index = 128; // invalid stream index means no language info @@ -959,7 +960,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk /* new packet */ av_new_packet(&asf_st->pkt, asf->packet_obj_size); asf_st->seq = asf->packet_seq; - asf_st->pkt.dts = asf->packet_frag_timestamp; + asf_st->pkt.dts = asf->packet_frag_timestamp - asf->hdr.preroll; asf_st->pkt.stream_index = asf->stream_index; asf_st->pkt.pos = asf_st->packet_pos= asf->packet_pos; diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 7990ce7bbe..0471fd6c25 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -534,8 +534,6 @@ typedef struct AVStream { * Only set this if you are absolutely 100% sure that the value you set * it to really is the pts of the first frame. * This may be undefined (AV_NOPTS_VALUE). - * @note The ASF header does NOT contain a correct start_time the ASF - * demuxer must NOT set this. */ int64_t start_time; diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 86701fa1aa..fafbae86e5 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -846,6 +846,7 @@ static int write_trailer(AVFormatContext *s){ avio_flush(bc); ff_nut_free_sp(nut); av_freep(&nut->stream); + av_freep(&nut->chapter); av_freep(&nut->time_base); return 0; |