From 2928b83c7581ef3d66108684a2e6f07f5d049b50 Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date: Sun, 21 Mar 2010 16:34:04 +0000
Subject: [PATCH] Make av_open_input_file() return AVERROR_INVALIDDATA rather
 than AVERROR_NOFMT if the format is unknown / cannot be recognized.

It is returned AVERROR_INVALIDDATA, in the sense that the data is
invalid within what the specific libav* binary supports.

That was the last remaining use of AVERROR_NOFMT, which is going to be
dropped at the next libavutil major bump.

Originally committed as revision 22625 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index d9478dbbd01..db1dc14bb6a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -560,7 +560,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
 
     /* if still no format found, error */
     if (!fmt) {
-        err = AVERROR_NOFMT;
+        err = AVERROR_INVALIDDATA;
         goto fail;
     }
 
-- 
GitLab