X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Fv4l2.c;h=17451cdb60425a74348dcd4e0b4a0b764e42de84;hb=d168fe14e949b100f9552198339502331405d8ad;hp=15629755a1125792fcfb0dc0dfac8e79e499a9ec;hpb=58ed9deec8688941648d1da96805bf4c2f51441e;p=ffmpeg diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 15629755a11..17451cdb604 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -884,14 +884,14 @@ static int v4l2_read_header(AVFormatContext *ctx) avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ if (s->pixel_format) { - AVCodec *codec = avcodec_find_decoder_by_name(s->pixel_format); + const AVCodecDescriptor *desc = avcodec_descriptor_get_by_name(s->pixel_format); - if (codec) - ctx->video_codec_id = codec->id; + if (desc) + ctx->video_codec_id = desc->id; pix_fmt = av_get_pix_fmt(s->pixel_format); - if (pix_fmt == AV_PIX_FMT_NONE && !codec) { + if (pix_fmt == AV_PIX_FMT_NONE && !desc) { av_log(ctx, AV_LOG_ERROR, "No such input format: %s.\n", s->pixel_format);