packages: ffmpeg/ffmpeg-bug-803.patch (NEW) - fix for encode error at the e...

glen glen at pld-linux.org
Tue May 12 00:30:46 CEST 2009


Author: glen                         Date: Mon May 11 22:30:46 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix for encode error at the end of stream with lame 0.83.2:
  lame: output buffer too small (buffer index: 9613, free bytes: 179)
  https://roundup.mplayerhq.hu/roundup/ffmpeg/issue803
  http://sourceforge.net:80/tracker/?func=detail&aid=2553863&group_id=290&atid=100290
  http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/84314

---- Files affected:
packages/ffmpeg:
   ffmpeg-bug-803.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ffmpeg/ffmpeg-bug-803.patch
diff -u /dev/null packages/ffmpeg/ffmpeg-bug-803.patch:1.1
--- /dev/null	Tue May 12 00:30:46 2009
+++ packages/ffmpeg/ffmpeg-bug-803.patch	Tue May 12 00:30:41 2009
@@ -0,0 +1,29 @@
+--- ffmpeg-20080908/libavcodec/libmp3lame.c.orig	2008-08-09 21:37:36.000000000 +0400
++++ ffmpeg-20080908/libavcodec/libmp3lame.c	2009-02-03 11:22:37.000000000 +0300
+@@ -34,6 +34,7 @@
+     int stereo;
+     uint8_t buffer[BUFFER_SIZE];
+     int buffer_index;
++    int flushed;
+ } Mp3AudioContext;
+ 
+ static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
+@@ -166,12 +167,18 @@
+                 BUFFER_SIZE - s->buffer_index
+                 );
+         }
++        s->flushed = 0;
+     }else{
++        if (s->flushed)
++            lame_result = 0;
++        else {
++            s->flushed = 1;
+         lame_result= lame_encode_flush(
+                 s->gfp,
+                 s->buffer + s->buffer_index,
+                 BUFFER_SIZE - s->buffer_index
+                 );
++        }
+     }
+ 
+     if(lame_result==-1) {
================================================================


More information about the pld-cvs-commit mailing list