Commit 0501d064 authored by Stephan Hilb's avatar Stephan Hilb Committed by Stefano Sabatini

lavd/v4l2: use avcodec_find_decoder in list_formats

Because libavdevice/v4l2 is a demuxer, it makes sense to look for
decoders instead of encoders when listing the formats supported by the
device.
Signed-off-by: 's avatarStefano Sabatini <stefasab@gmail.com>
parent 4ade824e
......@@ -360,7 +360,7 @@ static void list_formats(AVFormatContext *ctx, int fd, int type)
vfd.description);
} else if (vfd.flags & V4L2_FMT_FLAG_COMPRESSED &&
type & V4L_COMPFORMATS) {
AVCodec *codec = avcodec_find_encoder(codec_id);
AVCodec *codec = avcodec_find_decoder(codec_id);
av_log(ctx, AV_LOG_INFO, "Compressed: %9s : %20s :",
codec ? codec->name : "Unsupported",
vfd.description);
......
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