avformat/icoenc: Use avcodec_get_name() instead of codec descriptor
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
7d5e27b473
commit
63a5e83de8
@ -27,7 +27,6 @@
|
|||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
|
|
||||||
#include "libavcodec/codec_desc.h"
|
|
||||||
#include "libavcodec/codec_id.h"
|
#include "libavcodec/codec_id.h"
|
||||||
|
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
@ -66,8 +65,7 @@ static int ico_check_attributes(AVFormatContext *s, const AVCodecParameters *p)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const AVCodecDescriptor *codesc = avcodec_descriptor_get(p->codec_id);
|
av_log(s, AV_LOG_ERROR, "Unsupported codec %s\n", avcodec_get_name(p->codec_id));
|
||||||
av_log(s, AV_LOG_ERROR, "Unsupported codec %s\n", codesc ? codesc->name : "");
|
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user