[FFmpeg-cvslog] ffmpeg: fix handling or empty audio packets

Michael Niedermayer git at videolan.org
Tue Mar 27 03:09:43 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 27 02:43:40 2012 +0200| [a0820eaa8a5f96a3254b096e59fbd390f7b0afa6] | committer: Michael Niedermayer

ffmpeg: fix handling or empty audio packets

Fixes Ticket1131

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0820eaa8a5f96a3254b096e59fbd390f7b0afa6
---

 ffmpeg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index f66828f..d5e789e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1083,7 +1083,7 @@ static int encode_audio_frame(AVFormatContext *s, OutputStream *ost,
     pkt.data = NULL;
     pkt.size = 0;
 
-    if (buf) {
+    if (buf && buf_size) {
         if (!ost->output_frame) {
             ost->output_frame = avcodec_alloc_frame();
             if (!ost->output_frame) {



More information about the ffmpeg-cvslog mailing list