[FFmpeg-devel] [PATCH 1/2] lavd/v4l2: use avcodec_find_decoder in list_formats
Stephan Hilb
stephan at ecshi.net
Sun Jan 27 12:17:39 CET 2013
Because libavdevice/v4l2 is a demuxer, it makes sense to look for
decoders instead of encoders when listing the formats supported by the
device.
---
libavdevice/v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index e1efe55..1bf173d 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -361,7 +361,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);
--
1.8.1.1
More information about the ffmpeg-devel
mailing list