Commit e40fed0b authored by Zdenek Kabelac's avatar Zdenek Kabelac

* 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
parent 6bb925f4
......@@ -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;
......
......@@ -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;
......
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