diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-22 03:44:26 +0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-23 03:10:21 +0400 |
commit | fd4872184945ff4275f04f7b95ee7aba49407f3c (patch) | |
tree | b94c5a725b61b55a5951a1d0c7b59b45b088fe9f /libavformat/matroskaenc.c | |
parent | a6e922ffa2fdcc467d07fd6454a4557625c750ad (diff) |
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.
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 61a91d7117..4504d295ea 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1292,16 +1292,10 @@ AVOutputFormat ff_matroska_muxer = { .mime_type = "video/x-matroska", .extensions = "mkv", .priv_data_size = sizeof(MatroskaMuxContext), -#if CONFIG_LIBVORBIS_ENCODER - .audio_codec = CODEC_ID_VORBIS, -#else - .audio_codec = CODEC_ID_AC3, -#endif -#if CONFIG_LIBX264_ENCODER - .video_codec = CODEC_ID_H264, -#else - .video_codec = CODEC_ID_MPEG4, -#endif + .audio_codec = CONFIG_LIBVORBIS_ENCODER ? + CODEC_ID_VORBIS : CODEC_ID_AC3, + .video_codec = CONFIG_LIBX264_ENCODER ? + CODEC_ID_H264 : CODEC_ID_MPEG4, .write_header = mkv_write_header, .write_packet = mkv_write_packet, .write_trailer = mkv_write_trailer, @@ -1339,11 +1333,8 @@ AVOutputFormat ff_matroska_audio_muxer = { .mime_type = "audio/x-matroska", .extensions = "mka", .priv_data_size = sizeof(MatroskaMuxContext), -#if CONFIG_LIBVORBIS_ENCODER - .audio_codec = CODEC_ID_VORBIS, -#else - .audio_codec = CODEC_ID_AC3, -#endif + .audio_codec = CONFIG_LIBVORBIS_ENCODER ? + CODEC_ID_VORBIS : CODEC_ID_AC3, .video_codec = CODEC_ID_NONE, .write_header = mkv_write_header, .write_packet = mkv_write_packet, |