Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/ffm.c')
-rw-r--r--libavformat/ffm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/ffm.c b/libavformat/ffm.c
index c21599c69f..cd7a174d06 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) {