]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/wmadec.c
Add operand size to add instructions.
[ffmpeg] / libavcodec / wmadec.c
index 3da1a60c195b3be6d0fcb55fbd5599d6772675ab..9eaf230b01aa9ec942b0b994f4bc94e7e37bf12b 100644 (file)
@@ -827,8 +827,9 @@ static int wma_decode_superframe(AVCodecContext *avctx,
         return 0;
     }
     if (buf_size < s->block_align)
-        return 0;
-    buf_size = s->block_align;
+        return AVERROR(EINVAL);
+    if(s->block_align)
+        buf_size = s->block_align;
 
     samples = data;
 
@@ -911,9 +912,8 @@ static int wma_decode_superframe(AVCodecContext *avctx,
     }
 
 //av_log(NULL, AV_LOG_ERROR, "%d %d %d %d outbytes:%d eaten:%d\n", s->frame_len_bits, s->block_len_bits, s->frame_len, s->block_len,        (int8_t *)samples - (int8_t *)data, s->block_align);
-
     *data_size = (int8_t *)samples - (int8_t *)data;
-    return s->block_align;
+    return buf_size;
  fail:
     /* when error, we reset the bit reservoir */
     s->last_superframe_len = 0;