lavc: avcodec_get_name: return "none" for AV_CODEC_ID_NONE.
authorNicolas George <nicolas.george@normalesup.org>
Sun, 19 Aug 2012 13:26:05 +0000 (15:26 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Sun, 19 Aug 2012 13:26:05 +0000 (15:26 +0200)
libavcodec/utils.c

index a96b52d..150d907 100644 (file)
@@ -1851,6 +1851,8 @@ const char *avcodec_get_name(enum AVCodecID id)
     const AVCodecDescriptor *cd;
     AVCodec *codec;
 
+    if (id == AV_CODEC_ID_NONE)
+        return "none";
     cd = avcodec_descriptor_get(id);
     if (cd)
         return cd->name;