]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mp3lameaudio.c
No more HTML in Changelog
[ffmpeg] / libavcodec / mp3lameaudio.c
index a047e1a19eadbb8398e5ad7c067a24d7dae9bf76..4e1660d4ebd585878f82d2ed0da1fbbcc1e8cef5 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+/**
+ * @file mp3lameaudio.c
+ * Interface to libmp3lame for mp3 encoding.
+ */
 
 #include "avcodec.h"
 #include "mpegaudio.h"
@@ -50,7 +55,9 @@ static int MP3lame_encode_init(AVCodecContext *avctx)
                goto err_close;
 
        avctx->frame_size = MPA_FRAME_SIZE;
-       avctx->key_frame = 1;
+    
+        avctx->coded_frame= avcodec_alloc_frame();
+        avctx->coded_frame->key_frame= 1;
 
        return 0;
 
@@ -81,6 +88,8 @@ int MP3lame_encode_frame(AVCodecContext *avctx,
 int MP3lame_encode_close(AVCodecContext *avctx)
 {
        Mp3AudioContext *s = avctx->priv_data;
+    
+        av_freep(&avctx->coded_frame);
 
        lame_close(s->gfp);
        return 0;