changeset 7301:aab7f1fb59ea libavcodec

If metadata has been parsed goto end instead of trying to decorrelate and output somehing nonexistng.
author michael
date Fri, 18 Jul 2008 11:08:15 +0000
parents 7e806e21c193
children 3d8cf33fbafb
files flac.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flac.c	Fri Jul 18 07:15:50 2008 +0000
+++ b/flac.c	Fri Jul 18 11:08:15 2008 +0000
@@ -632,8 +632,9 @@
 
     init_get_bits(&s->gb, buf, buf_size*8);
 
-    if (!metadata_parse(s))
-    {
+    if(metadata_parse(s))
+        goto end;
+
         tmp = show_bits(&s->gb, 16);
         if((tmp & 0xFFFE) != 0xFFF8){
             av_log(s->avctx, AV_LOG_ERROR, "FRAME HEADER not here\n");
@@ -648,7 +649,6 @@
             s->bitstream_index=0;
             return -1;
         }
-    }
 
 
 #if 0