On Tue, Oct 28, 2014 at 10:02:18AM +0100, Carl Eugen Hoyos wrote: > On Tuesday 28 October 2014 09:56:28 am Clément Bœsch wrote: > > > > + if (s && (r->type == FF_UTF16LE || r->type == FF_UTF16BE)) > > > + av_log(s, AV_LOG_WARNING, > > > + "UTF16 is automatically converted to UTF8, do not specify > > > a character encoding\n"); > > > > av_log() accepts a NULL pointer, this is confusing: you don't want to warn > > when there is no log context? > > It spams the console (from probing) without this check >
So the behaviour depends on its state; this should be said in the doxy. > > > -void ff_text_init_avio(FFTextReader *r, AVIOContext *pb); > > > +void ff_text_init_avio(AVFormatContext *s, FFTextReader *r, AVIOContext > > > *pb); > > > > If you want to use it only for logging, make it void* > > Why is this better? > > I mean the function is not public and only used from within libavformat, > so why not using the actual type? > Because it suggests you're going to access the content of the format context (like, maybe you are reading and writing avctx->sub_charenc or something?) > Thank you, Carl Eugen -- Clément B.
pgppGhwm0dT4t.pgp
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel