mirror of https://git.ffmpeg.org/ffmpeg.git
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: Stefano Sabatini <stefasab@gmail.com>
This commit is contained in:
parent
4ade824e1f
commit
0501d06468
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue