[FFmpeg-devel] [RFC]Print a warning if a subtitle demuxer changes utf16 to utf8.
u at pkh.me
Tue Oct 28 10:05:42 CET 2014
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
> Thank you, Carl Eugen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 473 bytes
Desc: not available
More information about the ffmpeg-devel