Index: libavformat/avienc.c
===================================================================
--- libavformat/avienc.c	(revision 26402)
+++ libavformat/avienc.c	(working copy)
@@ -85,8 +85,10 @@
 
 static char* avi_stream2fourcc(char* tag, int index, enum AVMediaType type)
 {
-    tag[0] = '0';
-    tag[1] = '0' + index;
+    // This works when the total stream count is <= 99.
+    // When the count is >= 100, no answer then...
+    tag[0] = '0' + (index/10);
+    tag[1] = '0' + (index%10);
     if (type == AVMEDIA_TYPE_VIDEO) {
         tag[2] = 'd';
         tag[3] = 'c';
