diff options
author | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-10-31 12:22:32 +0000 |
---|---|---|
committer | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-10-31 12:22:32 +0000 |
commit | e40fed0b62f5b8cb1736f6783b384c576455e7f1 (patch) | |
tree | 949648d3da14605e66492162b91605f50966a935 | |
parent | 6bb925f47dbcb073ee505ed71231c6662aec5ed1 (diff) | |
download | ffmpeg-e40fed0b62f5b8cb1736f6783b384c576455e7f1.tar.gz |
* removed extra_data from AVStream (it's part of Codec)
* removed pts*1000 for paket timing (using ms)
Originally committed as revision 1128 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libav/asf.c | 12 | ||||
-rw-r--r-- | libav/avformat.h | 2 |
2 files changed, 4 insertions, 10 deletions
diff --git a/libav/asf.c b/libav/asf.c index eb48667e1d..cdbcd7f7fb 100644 --- a/libav/asf.c +++ b/libav/asf.c @@ -870,9 +870,9 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) tag1 = get_le32(pb); url_fskip(pb, 20); if (size > 40) { - st->extra_data_size = size - 40; - st->extra_data = av_mallocz(st->extra_data_size); - get_buffer(pb, st->extra_data, st->extra_data_size); + st->codec.extradata_size = size - 40; + st->codec.extradata = av_mallocz(st->codec.extradata_size); + get_buffer(pb, st->codec.extradata, st->codec.extradata_size); } st->codec.codec_tag = tag1; st->codec.codec_id = codec_get_id(codec_bmp_tags, tag1); @@ -944,10 +944,8 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) fail: for(i=0;i<s->nb_streams;i++) { AVStream *st = s->streams[i]; - if (st) { + if (st) av_free(st->priv_data); - av_free(st->extra_data); - } av_free(st); } //av_free(asf); @@ -1130,7 +1128,6 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt) av_new_packet(&asf_st->pkt, asf->packet_obj_size); asf_st->seq = asf->packet_seq; asf_st->pkt.pts = asf->packet_frag_timestamp - asf->hdr.preroll; - asf_st->pkt.pts *= 1000; // us asf_st->pkt.stream_index = asf->stream_index; if (asf->packet_key_frame) asf_st->pkt.flags |= PKT_FLAG_KEY; @@ -1188,7 +1185,6 @@ static int asf_read_close(AVFormatContext *s) for(i=0;i<s->nb_streams;i++) { AVStream *st = s->streams[i]; av_free(st->priv_data); - av_free(st->extra_data); } //av_free(asf); return 0; diff --git a/libav/avformat.h b/libav/avformat.h index 1fc099a145..37a2a13e5a 100644 --- a/libav/avformat.h +++ b/libav/avformat.h @@ -136,8 +136,6 @@ typedef struct AVStream { AVCodecContext codec; /* codec context */ int r_frame_rate; /* real frame rate of the stream */ uint64_t time_length; /* real length of the stream in miliseconds */ - void* extra_data; /* some extra data - i.e. longer WAVEFORMATEX */ - int extra_data_size; /* size of extra data chunk */ void *priv_data; /* internal data used in av_find_stream_info() */ int codec_info_state; |