[FFmpeg-cvslog] v4l2: Use the codec descriptor facility

Luca Barbato git at videolan.org
Mon Mar 2 20:24:18 CET 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Fri Feb 27 02:12:33 2015 +0100| [619d5e7db88941cadb8136f805564e885c6c6434] | committer: Luca Barbato

v4l2: Use the codec descriptor facility

The encoder or decoder might be disabled but the format would be
supported for at least remuxing.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=619d5e7db88941cadb8136f805564e885c6c6434
---

 libavdevice/v4l2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 302639d..d2707e6 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -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;



More information about the ffmpeg-cvslog mailing list