[FFmpeg-devel] [RFC]Print a warning if a subtitle demuxer changes utf16 to utf8.
Carl Eugen Hoyos
cehoyos at ag.or.at
Tue Oct 28 10:02:18 CET 2014
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
> > -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?
Thank you, Carl Eugen
More information about the ffmpeg-devel
mailing list