summaryrefslogtreecommitdiff
path: root/libavformat/oggenc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-06-21 20:16:48 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-06-21 20:16:48 +0000
commit3f2eadf4fe7e91e467501fa7108d2bf49f8c1ae1 (patch)
tree9a883c67b2b3a987f4f850f77fecec48e2c83a7d /libavformat/oggenc.c
parent4315aa8b05bc9f2865b1357a1e8cbf8f93042313 (diff)
oggenc: return error value from ogg_build_flac_headers()
Originally committed as revision 19247 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggenc.c')
-rw-r--r--libavformat/oggenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index afed87f8b0..d36b0c42f6 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -149,10 +149,12 @@ static int ogg_write_header(AVFormatContext *s)
oggstream = av_mallocz(sizeof(*oggstream));
st->priv_data = oggstream;
if (st->codec->codec_id == CODEC_ID_FLAC) {
- if (ogg_build_flac_headers(st->codec,
- oggstream, st->codec->flags & CODEC_FLAG_BITEXACT) < 0) {
+ int err = ogg_build_flac_headers(st->codec, oggstream,
+ st->codec->flags & CODEC_FLAG_BITEXACT);
+ if (err) {
av_log(s, AV_LOG_ERROR, "Extradata corrupted\n");
av_freep(&st->priv_data);
+ return err;
}
} else {
if (ff_split_xiph_headers(st->codec->extradata, st->codec->extradata_size,