[FFmpeg-devel] [PATCH][RFC] Use AVERROR_DEMUXER_NOT_FOUND retcode

Nicolas George nicolas.george at normalesup.org
Tue Jul 30 15:23:47 CEST 2013


Le duodi 12 thermidor, an CCXXI, Andrey Utkin a écrit :
> I was asked "how to distinguish error cases of unsupported input format
> and of broken file".

How do you define, technically, the difference?

That would mean you have two levels of probing: first one that says "I tawt
I taw an AVI file.", and second one that says "I did! I did! I did taw an
AVI file.". lavf does not have that.

Or maybe it detects the AVI file, but does not find the demuxer? But that
does not work that way either: the probing comes with the demuxer.

If you have files that are probed to a format but that the corresponding
demuxer can not actually open, this could be considered a bug, please share
them.

> I figured out that constant AVERROR_DEMUXER_NOT_FOUND is currently unused,
> and AVERROR_INVALIDDATA was returned instead in av_probe_input_buffer().
> I didn't test this change yet. I just ask if this point is valid.

IMHO, not. DEMUXER_NOT_FOUND was added for symmetry and completeness with
DECODER_NOT_FOUND and similar, that is the reason it is there but not used.
I suspect it could be useful for a high-level API that opens the file with a
specified demuxer expressed as a string: if the demuxer exists but fails to
open the file, INVALIDDATA, if the demuxer does not exist,
DEMUXER_NOT_FOUND.

I believe the distinction you are trying to make does not actually make
sense, in fact.

Regards,

-- 
  Nicolas George
-------------- 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/20130730/be219d1f/attachment.asc>


More information about the ffmpeg-devel mailing list