[vlc-commits] rav1e: differentiate errors and fix error message
Tristan Matthews
git at videolan.org
Thu Sep 24 21:42:06 CEST 2020
vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Thu Sep 24 15:40:52 2020 -0400| [609bd6453d0f03b1e923b4afeb550c570b52f800] | committer: Tristan Matthews
rav1e: differentiate errors and fix error message
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=609bd6453d0f03b1e923b4afeb550c570b52f800
---
modules/codec/rav1e.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/codec/rav1e.c b/modules/codec/rav1e.c
index fe6098d704..5e6df303bc 100644
--- a/modules/codec/rav1e.c
+++ b/modules/codec/rav1e.c
@@ -156,6 +156,7 @@ static int OpenEncoder(vlc_object_t *this)
}
int ret;
+ int err = VLC_EGENERIC;
ret = rav1e_config_parse_int(ra_config, "height", enc->fmt_in.video.i_visible_height);
if (ret < 0)
@@ -173,7 +174,8 @@ static int OpenEncoder(vlc_object_t *this)
RaRational *timebase = malloc(sizeof(RaRational));
if (timebase == NULL)
{
- msg_Err(enc, "%s", "Unable to set width\n");
+ msg_Err(enc, "%s", "Unable to allocate timebase\n");
+ err = VLC_ENOMEM;
goto error;
}
@@ -259,6 +261,7 @@ static int OpenEncoder(vlc_object_t *this)
if (!sys->ra_context)
{
msg_Err(enc, "Unable to allocate a new context\n");
+ err = VLC_ENOMEM;
goto error;
}
rav1e_config_unref(ra_config);
@@ -273,7 +276,7 @@ static int OpenEncoder(vlc_object_t *this)
error:
rav1e_config_unref(ra_config);
free(sys);
- return VLC_EGENERIC;
+ return err;
}
static void CloseEncoder(vlc_object_t* this)
More information about the vlc-commits
mailing list