[FFmpeg-devel] [PATCH] set data_size to zero if failed to parse dca header

Limin Wang lance.lmwang
Thu Sep 6 12:56:06 CEST 2007


Hi,

$subj, please review attached patch. 


Thanks,
Limin
-------------- next part --------------
Index: libavcodec/dca.c
===================================================================
--- libavcodec/dca.c	(revision 10421)
+++ libavcodec/dca.c	(working copy)
@@ -1151,6 +1151,7 @@
     init_get_bits(&s->gb, s->dca_buffer, s->dca_buffer_size * 8);
     if (dca_parse_frame_header(s) < 0) {
         //seems like the frame is corrupt, try with the next one
+        *data_size=0;
         return buf_size;
     }
     //set AVCodec values with parsed data



More information about the ffmpeg-devel mailing list