[FFmpeg-devel] More specific error codes

wm4 nfxjfg at googlemail.com
Wed Sep 17 22:30:43 CEST 2014


On Wed, 17 Sep 2014 22:56:27 +0300
Andrey Utkin <andrey.krieger.utkin at gmail.com> wrote:

> I have got many complaints about FFmpeg error codes being too
> abstract. Not helpful for quick resolution, in a lot of such cases
> real issue with application must be investigated manually (by
> reviewing log with debug loglevel and/or sniffing traffic).
> E.g., "Invalid data" may mean almost everything, including 404 Not
> Found by RTSP.
> I propose to introduce more specific error codes, like
> - "resource not found",
> - "auth failed"
> and so on.
> Please let me know what you think about this.

I agree. Specifically, wrapping unix error codes is more than useless.

Logging could also be better. It's true that you can't give an error
code for everything, because some things are just too special, and
you'd end up with an unusable amount of error codes. It would be fine
to just print an error message via the log callback. Unfortunately,
it's hard to separate random errors from corrupted or unexpected data,
and error messages that might actually be helpful to the user. Also,
the log callback is global.

Sometimes libav* will print messages that make sense only with ffmpeg
or ffplay cli (like the warning about experimental decoders).

The real problem is that there are hundreds of kloc code which all
handles this inconsistently/badly, and cleaning that up would be not
feasible.

> For now, is there a reference table for possible reasons of currently
> used error codes?
> 


More information about the ffmpeg-devel mailing list