aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-04-17 00:37:05 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-04-17 00:37:05 +0200
commitfe1de12fafcefb9192eb135a472b2d859fe58082 (patch)
tree2ccd1140b81681a4a27bf793ba88ffa93a3252b6
parent9802f56684fe1cda5b42b76deb83d6a06a42d07d (diff)
downloadffmpeg-fe1de12fafcefb9192eb135a472b2d859fe58082.tar.gz
Remove two anonymous arrays.
Fixes compilation of pngenc.c and flvdec.c with PGC 13.4-0.
-rw-r--r--libavcodec/pngenc.c3
-rw-r--r--libavformat/flvdec.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index a401c78f77..5ba5983776 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -57,8 +57,9 @@ static void png_get_interlaced_row(uint8_t *dst, int row_size,
int x, mask, dst_x, j, b, bpp;
uint8_t *d;
const uint8_t *s;
+ static const int masks[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
- mask = (int[]){0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}[pass];
+ mask = masks[pass];
switch(bits_per_pixel) {
case 1:
memset(dst, 0, row_size);
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 0bb51e0ea7..8bb56e85c0 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -742,9 +742,10 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
}
}
if(i == s->nb_streams){
+ static const enum AVMediaType stream_types[] = {AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_DATA};
av_log(s, AV_LOG_WARNING, "Stream discovered after head already parsed\n");
st = create_stream(s,
- (int[]){AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_DATA}[stream_type]);
+ stream_types[stream_type]);
if (!st)
return AVERROR(ENOMEM);