lavc: avcodec_get_name: return "none" for AV_CODEC_ID_NONE.

This commit is contained in:
Nicolas George 2012-08-19 15:26:05 +02:00
parent c9fe864472
commit c28d80f4c9
1 changed files with 2 additions and 0 deletions

View 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;