Browse Source

pass extradata through ffm

Originally committed as revision 13721 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Baptiste Coudurier 17 years ago
parent
commit
7080cbe2c8
2 changed files with 11 additions and 1 deletions
  1. +7
    -1
      libavformat/ffmdec.c
  2. +4
    -0
      libavformat/ffmenc.c

+ 7
- 1
libavformat/ffmdec.c View File

@@ -320,7 +320,13 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
default: default:
goto fail; goto fail;
} }

if (codec->flags & CODEC_FLAG_GLOBAL_HEADER) {
codec->extradata_size = get_be32(pb);
codec->extradata = av_malloc(codec->extradata_size);
if (!codec->extradata)
return AVERROR(ENOMEM);
get_buffer(pb, codec->extradata, codec->extradata_size);
}
} }


/* get until end of block reached */ /* get until end of block reached */


+ 4
- 0
libavformat/ffmenc.c View File

@@ -168,6 +168,10 @@ static int ffm_write_header(AVFormatContext *s)
default: default:
return -1; return -1;
} }
if (codec->flags & CODEC_FLAG_GLOBAL_HEADER) {
put_be32(pb, codec->extradata_size);
put_buffer(pb, codec->extradata, codec->extradata_size);
}
} }


/* flush until end of block reached */ /* flush until end of block reached */


Loading…
Cancel
Save