[FFmpeg-cvslog] r23392 - trunk/libavformat/au.c

pross subversion
Mon May 31 12:47:36 CEST 2010


Author: pross
Date: Mon May 31 12:47:36 2010
New Revision: 23392

Log:
Prevent au_read_packet() looping endlessly when .au file contains unsupported codec type.

Modified:
   trunk/libavformat/au.c

Modified: trunk/libavformat/au.c
==============================================================================
--- trunk/libavformat/au.c	Mon May 31 01:57:51 2010	(r23391)
+++ trunk/libavformat/au.c	Mon May 31 12:47:36 2010	(r23392)
@@ -139,6 +139,11 @@ static int au_read_header(AVFormatContex
 
     codec = ff_codec_get_id(codec_au_tags, id);
 
+    if (!av_get_bits_per_sample(codec)) {
+        av_log_ask_for_sample(s, "could not determine bits per sample\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     if (size >= 24) {
         /* skip unused data */
         url_fseek(pb, size - 24, SEEK_CUR);



More information about the ffmpeg-cvslog mailing list