[FFmpeg-devel] [PATCH] libvorbis: fix logging segfault when iblock is out of range

James Zern jzern
Wed Oct 13 03:29:51 CEST 2010


Using the iblock option added in r25258, attempting to set iblock to
an invalid value will cause a segfault when attempting to log the
warning. The attached sets item_name to avoid this.
-------------- next part --------------
Index: libavcodec/libvorbis.c
===================================================================
--- libavcodec/libvorbis.c	(revision 25455)
+++ libavcodec/libvorbis.c	(working copy)
@@ -58,7 +58,7 @@
 {"iblock", "Sets the impulse block bias", offsetof(OggVorbisContext, iblock), FF_OPT_TYPE_DOUBLE, 0, -15, 0, AV_OPT_FLAG_ENCODING_PARAM},
 {NULL}
 };
-static const AVClass class = { "libvorbis", NULL, options, LIBAVUTIL_VERSION_INT };
+static const AVClass class = { "libvorbis", av_default_item_name, options, LIBAVUTIL_VERSION_INT };
 
 static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) {
     OggVorbisContext *context = avccontext->priv_data ;



More information about the ffmpeg-devel mailing list