aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki@gmail.com>2014-02-28 01:12:07 +0100
committerLukasz Marek <lukasz.m.luki@gmail.com>2014-03-06 00:30:27 +0100
commitf495fbe76a2665cdea092999ca2dbb603d13280c (patch)
tree3b2bb53d835ccc6967ed12055853db52e10a9b10
parent9deecdf85f0c1cebcc0a157114bf6dbc02a0a120 (diff)
downloadffmpeg-f495fbe76a2665cdea092999ca2dbb603d13280c.tar.gz
lavf/avio: fix ffurl_alloc error checks
ffurl_alloc doc says it returns >= 0 in case of success. avio treats non-zero as errors. Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
-rw-r--r--libavformat/avio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index a76f9db3b8..e366dfa388 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -270,7 +270,7 @@ int ffurl_open(URLContext **puc, const char *filename, int flags,
const AVIOInterruptCB *int_cb, AVDictionary **options)
{
int ret = ffurl_alloc(puc, filename, flags, int_cb);
- if (ret)
+ if (ret < 0)
return ret;
if (options && (*puc)->prot->priv_data_class &&
(ret = av_opt_set_dict((*puc)->priv_data, options)) < 0)
@@ -399,7 +399,7 @@ int avio_check(const char *url, int flags)
{
URLContext *h;
int ret = ffurl_alloc(&h, url, flags, NULL);
- if (ret)
+ if (ret < 0)
return ret;
if (h->prot->url_check) {