]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libfaad.c
Fix rc_eq mem leak.
[ffmpeg] / libavcodec / libfaad.c
index dc66788830c70dee921781e8444c163477238573..3e7339d6f49f036d0ab080accd077683a4261272 100644 (file)
@@ -196,7 +196,8 @@ static int faac_decode_frame(AVCodecContext *avctx,
                s->faacDecGetErrorMessage(frame_info.error));
         return -1;
     }
-
+    if (!avctx->frame_size)
+        avctx->frame_size = frame_info.samples/avctx->channels;
     frame_info.samples *= s->sample_size;
     memcpy(data, out, frame_info.samples); // CHECKME - can we cheat this one
 
@@ -312,6 +313,7 @@ static av_cold int faac_decode_init(AVCodecContext *avctx)
     if(!s->init && avctx->channels > 0)
         channel_setup(avctx);
 
+    avctx->sample_fmt = SAMPLE_FMT_S16;
     return 0;
 }