avformat/img2enc: simplify split planes extension selection.
authorClément Bœsch <u@pkh.me>
Thu, 7 Nov 2013 19:28:44 +0000 (20:28 +0100)
committerClément Bœsch <u@pkh.me>
Thu, 7 Nov 2013 19:30:43 +0000 (20:30 +0100)
libavformat/img2enc.c

index daf6fc3..3529e12 100644 (file)
@@ -106,7 +106,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
 
             if (!img->split_planes || i+1 >= desc->nb_components)
                 break;
-            filename[strlen(filename) - 1] = ((int[]){'U','V','A','x'})[i];
+            filename[strlen(filename) - 1] = "UVAx"[i];
         }
     } else {
         pb[0] = s->pb;