]> git.pld-linux.org Git - packages/ffmpeg.git/commitdiff
- fix for encode error at the end of stream with lame 0.83.2:
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 11 May 2009 22:30:41 +0000 (22:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  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

Changed files:
    ffmpeg-bug-803.patch -> 1.1

ffmpeg-bug-803.patch [new file with mode: 0644]

diff --git a/ffmpeg-bug-803.patch b/ffmpeg-bug-803.patch
new file mode 100644 (file)
index 0000000..1a05c15
--- /dev/null
@@ -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) {
This page took 0.333273 seconds and 4 git commands to generate.