]> git.sesse.net Git - ffmpeg/commitdiff
v4l2: Use the codec descriptor facility
authorLuca Barbato <lu_zero@gentoo.org>
Fri, 27 Feb 2015 01:12:33 +0000 (02:12 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 2 Mar 2015 10:27:57 +0000 (11:27 +0100)
The encoder or decoder might be disabled but the format would be
supported for at least remuxing.

libavdevice/v4l2.c

index 302639d244a9236ebbf835129d460518adcb4d34..d2707e6848900b238674205c2813d747313df5db 100644 (file)
@@ -315,9 +315,9 @@ 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);
+            const AVCodecDescriptor *desc = avcodec_descriptor_get(codec_id);
             av_log(ctx, AV_LOG_INFO, "C : %9s : %20s :",
-                   codec ? codec->name : "Unsupported",
+                   desc ? desc->name : "Unsupported",
                    vfd.description);
         } else {
             continue;