diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-12-28 15:49:50 +0100 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-12-28 15:49:50 +0100 |
commit | ed7e1dcd4b45e65160f56e8e3d8127d2f41327c1 (patch) | |
tree | 1587599fbed79510f691b3a112ed0c19c1d30db2 /modules | |
parent | d7c174933ccf2bc9f1979e5013902ebe41086f5b (diff) |
vidloop: check return value of enable_codec()
Diffstat (limited to 'modules')
-rw-r--r-- | modules/vidloop/vidloop.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/vidloop/vidloop.c b/modules/vidloop/vidloop.c index 9357140..8870857 100644 --- a/modules/vidloop/vidloop.c +++ b/modules/vidloop/vidloop.c @@ -356,8 +356,13 @@ static int vidloop_start(struct re_printf *pf, void *arg) if (gvl) { if (gvl->vc_enc) disable_codec(gvl); - else - (void)enable_codec(gvl); + else { + err = enable_codec(gvl); + if (err) { + gvl = mem_deref(gvl); + return err; + } + } (void)re_hprintf(pf, "%sabled codec: %s\n", gvl->vc_enc ? "En" : "Dis", |