Commit 5be361ac authored by bcoudurier's avatar bcoudurier

pass extradata through ffm

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13721 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a9d4f02c
...@@ -320,7 +320,13 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -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 */
......
...@@ -168,6 +168,10 @@ static int ffm_write_header(AVFormatContext *s) ...@@ -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 */
......
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