changeset 5055:5a6bbdd352fb libavformat

oggenc: return error value from ogg_build_flac_headers()
author jbr
date Sun, 21 Jun 2009 20:16:48 +0000
parents 6c7d0a04ae96
children f67fad61077e
files oggenc.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/oggenc.c	Sun Jun 21 20:14:58 2009 +0000
+++ b/oggenc.c	Sun Jun 21 20:16:48 2009 +0000
@@ -149,10 +149,12 @@
         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,