summaryrefslogtreecommitdiff
path: root/libavdevice/v4l2.c
diff options
context:
space:
mode:
authorStephan Hilb <stephan@ecshi.net>2013-01-27 12:17:39 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-01-28 00:11:49 +0100
commit0501d0646849c34bdd09802fbe244626b81203b2 (patch)
tree73d748f428282026db6f6282010de3267bbdcde4 /libavdevice/v4l2.c
parent4ade824e1f6a27f2357098d8e7e615f1b524a588 (diff)
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>
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r--libavdevice/v4l2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index f6b72bd51a..5f0102746d 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -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);