mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue