Mercurial > libavcodec.hg
changeset 8016:81dba4c59fd6 libavcodec
allows calling avcodec_find_(en|de)coder_by_name with NULL parameter
author | aurel |
---|---|
date | Wed, 08 Oct 2008 17:19:26 +0000 |
parents | ad3949b075ba |
children | cecd3150f82b |
files | utils.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Tue Oct 07 21:41:25 2008 +0000 +++ b/utils.c Wed Oct 08 17:19:26 2008 +0000 @@ -1009,6 +1009,8 @@ AVCodec *avcodec_find_encoder_by_name(const char *name) { AVCodec *p; + if (!name) + return NULL; p = first_avcodec; while (p) { if (p->encode != NULL && strcmp(name,p->name) == 0) @@ -1033,6 +1035,8 @@ AVCodec *avcodec_find_decoder_by_name(const char *name) { AVCodec *p; + if (!name) + return NULL; p = first_avcodec; while (p) { if (p->decode != NULL && strcmp(name,p->name) == 0)