In mov muxer, fix adpcm mono muxing, patch by Alex Converse
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 28 Feb 2011 00:29:21 +0000 (16:29 -0800)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 28 Feb 2011 00:29:21 +0000 (16:29 -0800)
libavformat/movenc.c

index de16b5b..7179e7a 100644 (file)
@@ -91,6 +91,7 @@ static int mov_write_stsz_tag(AVIOContext *pb, MOVTrack *track)
     }
     if (equalChunks) {
         int sSize = track->cluster[0].size/track->cluster[0].entries;
+        sSize = FFMAX(1, sSize); // adpcm mono case could make sSize == 0
         avio_wb32(pb, sSize); // sample size
         avio_wb32(pb, entries); // sample count
     }