History

avcodec/bsf: Simplify getting codec name

All codec ids on BSF whitelists have a codec descriptor, so one can just use avcodec_get_name() without worrying about the case of what happens when no codec descriptor is found.

Andreas Rheinhardt committed 5 years ago

Commit 3e16d1c1 parent 0f6a3401 file · +2 −2Browse files

Unified · Split

libavcodec/bsf.c+2−2
@@ -160,9 +160,9 @@ int av_bsf_init(AVBSFContext *ctx) · 159 unmodified lines
160160 "bitstream filter '%s'. Supported codecs are: ",
161161 desc ? desc->name : "unknown", ctx->par_in->codec_id, ctx->filter->name);
162162 for (i = 0; ctx->filter->codec_ids[i] != AV_CODEC_ID_NONE; i++) {
163− desc = avcodec_descriptor_get(ctx->filter->codec_ids[i]);
163+ enum AVCodecID codec_id = ctx->filter->codec_ids[i];
164164 av_log(ctx, AV_LOG_ERROR, "%s (%d) ",
165− desc ? desc->name : "unknown", ctx->filter->codec_ids[i]);
165+ avcodec_get_name(codec_id), codec_id);
166166 }
167167 av_log(ctx, AV_LOG_ERROR, "\n");
168168 return AVERROR(EINVAL);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t