projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13394e8
)
allows calling avcodec_find_(en|de)coder_by_name with NULL parameter
author
Aurelien Jacobs
<aurel@gnuage.org>
Wed, 8 Oct 2008 17:19:26 +0000
(17:19 +0000)
committer
Aurelien Jacobs
<aurel@gnuage.org>
Wed, 8 Oct 2008 17:19:26 +0000
(17:19 +0000)
Originally committed as revision 15586 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
31a5d37
..
cc2a3a2
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-1009,6
+1009,8
@@
AVCodec *avcodec_find_encoder(enum CodecID id)
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(enum CodecID id)
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)