From c28d80f4c9360052943d2fdf708dd815cb1889d9 Mon Sep 17 00:00:00 2001
From: Nicolas George <nicolas.george@normalesup.org>
Date: Sun, 19 Aug 2012 15:26:05 +0200
Subject: [PATCH] lavc: avcodec_get_name: return "none" for AV_CODEC_ID_NONE.

---
 libavcodec/utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a96b52d6389..150d90703a6 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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;
-- 
GitLab