summaryrefslogtreecommitdiff
path: root/libavformat/oggenc.c
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2014-02-08 16:18:57 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-02-09 18:36:15 +0100
commitb0c2c097e422b9e10a7d856582f8321d28af821e (patch)
treeed909703aec67d6f8a4c07fd644e0ead18e1bdc8 /libavformat/oggenc.c
parentbc3f03567a04a9f7e412bcf2ca09c163f3f13941 (diff)
lavf: default .ogg audio to libvorbis if we can
Since 2007, the Xiph.org Foundation recommends that .ogg only be used for Ogg Vorbis audio files. Source: http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions However we only do it if we have libvorbis available because the built in vorbis encoder is not as good. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavformat/oggenc.c')
-rw-r--r--libavformat/oggenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index e96cde7dea..fd102c86ad 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -616,7 +616,8 @@ AVOutputFormat ff_ogg_muxer = {
.mime_type = "application/ogg",
.extensions = "ogg,ogv,spx,opus",
.priv_data_size = sizeof(OGGContext),
- .audio_codec = AV_CODEC_ID_FLAC,
+ .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
+ AV_CODEC_ID_VORBIS : AV_CODEC_ID_FLAC,
.video_codec = AV_CODEC_ID_THEORA,
.write_header = ogg_write_header,
.write_packet = ogg_write_packet,