[FFmpeg-devel] [PATCH] Extend -xerror in ffmpeg.c to react to codec errors
Michael Niedermayer
michaelni at gmx.at
Mon Aug 1 08:52:23 CEST 2011
sorry for my late awnser
On Wed, Jul 06, 2011 at 06:46:43PM -0400, yeratrin wrote:
> On 7/2/2011 12:02 AM, yeratrin wrote:
> > This seems to be consistent with the already-extant documentation
> > to "exit on error" and merely covers a missing case. Currently it
> > is possible for the ffmpeg console to show lots of "error"s and
> > xerror to do nothing.
>
> Is this patch (same as in referred-to email) at least potentially
> reasonable or is it missing something critical?
the idea is fine if this kind of thing is usefull to someone
[...]
>
> +static void log_callback_errorfilter(void* ptr, int level, const char* fmt, va_list vl)
> +{
> + av_log_default_callback(ptr, level, fmt, vl);
> +
> + /* level == AV_LOG_FATAL already caught */
> + if(exit_on_error && level == AV_LOG_ERROR)
> + ffmpeg_exit(1);
there are more codes between ERROR AND FATAL
also it ignores parent_log_context_offset, which means it can exit
out on things that would be presented as low as DEBUG or INFO
also i think this should be enabled seperately from -xerror.
a new cmdline option would also allow passing the log level at which
exiting would happen
last i would rather set a flag in the log callback and exit cleanly
from the main loop of ffmpeg based on the flag instead of a hard "exit"
in there.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 1
"Used only once" - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110801/f64f5fc3/attachment.asc>
More information about the ffmpeg-devel
mailing list