set frame_size in libfaad decoder
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 28 Jun 2008 19:41:18 +0000 (19:41 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 28 Jun 2008 19:41:18 +0000 (19:41 +0000)
Originally committed as revision 14024 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/libfaad.c

index dc66788..bb901f9 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