diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-12-04 10:04:03 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-12-04 10:04:03 +0000 |
commit | 1e491e29c27cf6a6925666e4f4eac41b65e263d7 (patch) | |
tree | 99879470b8deeb55e7d88c62729b62ac27d249ee /libavformat/ffm.c | |
parent | 855ea723b0ea450137e54674179751c14e8fc6b5 (diff) | |
download | ffmpeg-streaming-1e491e29c27cf6a6925666e4f4eac41b65e263d7.zip ffmpeg-streaming-1e491e29c27cf6a6925666e4f4eac41b65e263d7.tar.gz |
cleanup
adding AVVideoFrame
moving quality, pict_type, key_frame, qscale_table, ... to AVVideoFrame
removing obsolete variables in AVCodecContext
skiping of MBs in b frames
correctly initalizing AVCodecContext
picture buffer cleanup
Originally committed as revision 1302 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ffm.c')
-rw-r--r-- | libavformat/ffm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/ffm.c b/libavformat/ffm.c index c21599c..cd7a174 100644 --- a/libavformat/ffm.c +++ b/libavformat/ffm.c @@ -151,7 +151,7 @@ static int ffm_write_header(AVFormatContext *s) put_be32(pb, codec->codec_id); put_byte(pb, codec->codec_type); put_be32(pb, codec->bit_rate); - put_be32(pb, codec->quality); + put_be32(pb, st->quality); put_be32(pb, codec->flags); /* specific info */ switch(codec->codec_type) { @@ -232,7 +232,7 @@ static int ffm_write_packet(AVFormatContext *s, int stream_index, /* packet size & key_frame */ header[0] = stream_index; header[1] = 0; - if (st->codec.key_frame) + if (st->codec.coded_picture->key_frame) header[1] |= FLAG_KEY_FRAME; header[2] = (size >> 16) & 0xff; header[3] = (size >> 8) & 0xff; @@ -394,6 +394,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) st = av_mallocz(sizeof(AVStream)); if (!st) goto fail; + avcodec_get_context_defaults(&st->codec); s->streams[i] = st; fst = av_mallocz(sizeof(FFMStream)); if (!fst) @@ -405,7 +406,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) st->codec.codec_id = get_be32(pb); st->codec.codec_type = get_byte(pb); /* codec_type */ codec->bit_rate = get_be32(pb); - codec->quality = get_be32(pb); + st->quality = get_be32(pb); codec->flags = get_be32(pb); /* specific info */ switch(codec->codec_type) { |