From fd4872184945ff4275f04f7b95ee7aba49407f3c Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 21 Jul 2012 16:44:26 -0700 Subject: lavf: use conditional notation for default codec in muxer declarations. This removes the use of macro nesting in these code constructs, which makes it easier to parse in pre-processors. --- libavformat/movenc.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'libavformat/movenc.c') diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 2a5f1d7a3c..a97045cfc5 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3252,11 +3252,8 @@ AVOutputFormat ff_mov_muxer = { .extensions = "mov", .priv_data_size = sizeof(MOVMuxContext), .audio_codec = CODEC_ID_AAC, -#if CONFIG_LIBX264_ENCODER - .video_codec = CODEC_ID_H264, -#else - .video_codec = CODEC_ID_MPEG4, -#endif + .video_codec = CONFIG_LIBX264_ENCODER ? + CODEC_ID_H264 : CODEC_ID_MPEG4, .write_header = mov_write_header, .write_packet = mov_write_packet, .write_trailer = mov_write_trailer, @@ -3293,11 +3290,8 @@ AVOutputFormat ff_mp4_muxer = { .extensions = "mp4", .priv_data_size = sizeof(MOVMuxContext), .audio_codec = CODEC_ID_AAC, -#if CONFIG_LIBX264_ENCODER - .video_codec = CODEC_ID_H264, -#else - .video_codec = CODEC_ID_MPEG4, -#endif + .video_codec = CONFIG_LIBX264_ENCODER ? + CODEC_ID_H264 : CODEC_ID_MPEG4, .write_header = mov_write_header, .write_packet = mov_write_packet, .write_trailer = mov_write_trailer, @@ -3314,11 +3308,8 @@ AVOutputFormat ff_psp_muxer = { .extensions = "mp4,psp", .priv_data_size = sizeof(MOVMuxContext), .audio_codec = CODEC_ID_AAC, -#if CONFIG_LIBX264_ENCODER - .video_codec = CODEC_ID_H264, -#else - .video_codec = CODEC_ID_MPEG4, -#endif + .video_codec = CONFIG_LIBX264_ENCODER ? + CODEC_ID_H264 : CODEC_ID_MPEG4, .write_header = mov_write_header, .write_packet = mov_write_packet, .write_trailer = mov_write_trailer, -- cgit v1.2.3