[FFmpeg-cvslog] r19766 - trunk/libavcodec/wmaprodec.c

faust3 subversion
Sat Sep 5 12:59:09 CEST 2009


Author: faust3
Date: Sat Sep  5 12:59:09 2009
New Revision: 19766

Log:
fix handling of packet loss when the output buffer is full

Modified:
   trunk/libavcodec/wmaprodec.c

Modified: trunk/libavcodec/wmaprodec.c
==============================================================================
--- trunk/libavcodec/wmaprodec.c	Sat Sep  5 12:18:23 2009	(r19765)
+++ trunk/libavcodec/wmaprodec.c	Sat Sep  5 12:59:09 2009	(r19766)
@@ -1461,7 +1461,8 @@ static int decode_packet(AVCodecContext 
     s->samples_end   = (float*)((int8_t*)data + *data_size);
     *data_size = 0;
 
-    if (!s->output_buffer_full) {
+    if (!s->output_buffer_full || s->packet_loss) {
+        s->output_buffer_full = 0;
         s->buf_bit_size = buf_size << 3;
 
         /** sanity check for the buffer length */
@@ -1537,7 +1538,7 @@ static int decode_packet(AVCodecContext 
 
     *data_size = (int8_t *)s->samples - (int8_t *)data;
 
-    return (s->output_buffer_full)?0: avctx->block_align;
+    return (s->output_buffer_full && !s->packet_loss)?0: avctx->block_align;
 }
 
 /**



More information about the ffmpeg-cvslog mailing list