Commit 619d5e7d authored by Luca Barbato's avatar Luca Barbato

v4l2: Use the codec descriptor facility

The encoder or decoder might be disabled but the format would be
supported for at least remuxing.
parent dbc1163b
...@@ -315,9 +315,9 @@ static void list_formats(AVFormatContext *ctx, int fd, int type) ...@@ -315,9 +315,9 @@ static void list_formats(AVFormatContext *ctx, int fd, int type)
vfd.description); vfd.description);
} else if (vfd.flags & V4L2_FMT_FLAG_COMPRESSED && } else if (vfd.flags & V4L2_FMT_FLAG_COMPRESSED &&
type & V4L_COMPFORMATS) { type & V4L_COMPFORMATS) {
AVCodec *codec = avcodec_find_encoder(codec_id); const AVCodecDescriptor *desc = avcodec_descriptor_get(codec_id);
av_log(ctx, AV_LOG_INFO, "C : %9s : %20s :", av_log(ctx, AV_LOG_INFO, "C : %9s : %20s :",
codec ? codec->name : "Unsupported", desc ? desc->name : "Unsupported",
vfd.description); vfd.description);
} else { } else {
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment