avaudenc: post better error message if experimental codecs don't work

https://bugzilla.gnome.org/show_bug.cgi?id=691617
This commit is contained in:
Tim-Philipp Müller 2013-10-26 09:34:30 +01:00
parent 49d0c480ae
commit e9e31ebada

View file

@ -324,6 +324,16 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
if (avcodec_get_context_defaults3 (ffmpegaudenc->context,
oclass->in_plugin) < 0)
GST_DEBUG_OBJECT (ffmpegaudenc, "Failed to set context defaults");
if ((oclass->in_plugin->capabilities & CODEC_CAP_EXPERIMENTAL) &&
ffmpegaudenc->compliance != GST_FFMPEG_EXPERIMENTAL) {
GST_ELEMENT_ERROR (ffmpegaudenc, LIBRARY, SETTINGS,
("Codec is experimental, but settings don't allow encoders to "
"produce output of experimental quality"),
("This codec may not create output that is conformant to the specs "
"or of good quality. If you must use it anyway, set the "
"compliance property to experimental"));
}
return FALSE;
}