[FFmpeg-cvslog] r15277 - trunk/libavformat/utils.c

bcoudurier subversion
Mon Sep 8 21:37:22 CEST 2008


Author: bcoudurier
Date: Mon Sep  8 21:37:22 2008
New Revision: 15277

Log:
set block align in av_write_header if not set, fix issue #489

Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Mon Sep  8 21:37:22 2008
@@ -2444,6 +2444,9 @@ int av_write_header(AVFormatContext *s)
                 av_log(s, AV_LOG_ERROR, "sample rate not set\n");
                 return -1;
             }
+            if(!st->codec->block_align)
+                st->codec->block_align = st->codec->channels *
+                    av_get_bits_per_sample(st->codec->codec_id) >> 3;
             break;
         case CODEC_TYPE_VIDEO:
             if(st->codec->time_base.num<=0 || st->codec->time_base.den<=0){ //FIXME audio too?




More information about the ffmpeg-cvslog mailing list