]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/faad.c
Allow swscale emulation header to be included by C++ programs
[ffmpeg] / libavcodec / faad.c
index f11fd454c547759c06c2e266a5f932b151f73967..49cc789a51ce529fb158148c9c20c7aeb9f79c89 100644 (file)
@@ -160,11 +160,11 @@ static int faac_decode_frame(AVCodecContext *avctx,
     if(!s->init){
         unsigned long srate;
         unsigned char channels;
-        int r = faacDecInit(s->faac_handle, buf, buf_size, &srate, &channels);
+        int r = s->faacDecInit(s->faac_handle, buf, buf_size, &srate, &channels);
         if(r < 0){
             av_log(avctx, AV_LOG_ERROR, "faac: codec init failed: %s\n",
                    s->faacDecGetErrorMessage(frame_info.error));
-            return 0;
+            return -1;
         }
         avctx->sample_rate = srate;
         avctx->channels = channels;
@@ -176,7 +176,7 @@ static int faac_decode_frame(AVCodecContext *avctx,
     if (frame_info.error > 0) {
         av_log(avctx, AV_LOG_ERROR, "faac: frame decoding failed: %s\n",
                 s->faacDecGetErrorMessage(frame_info.error));
-        return 0;
+        return -1;
     }
 
     frame_info.samples *= s->sample_size;