Skip to content

Commit

Permalink
FFmpeg: Update v4l2_m2m code to latest FFmpeg master
Browse files Browse the repository at this point in the history
- fixes s905 decoding
  • Loading branch information
mark-kendall committed Nov 30, 2019
1 parent 6955b12 commit 253d4df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mythtv/external/FFmpeg/libavcodec/v4l2_context.c
Expand Up @@ -748,8 +748,8 @@ int ff_v4l2_context_init(V4L2Context* ctx)
ctx->num_buffers = req.count;
ctx->buffers = av_mallocz(ctx->num_buffers * sizeof(V4L2Buffer));
if (!ctx->buffers) {
av_log(logger(ctx), AV_LOG_ERROR, "%s malloc enomem\n", ctx->name);
return AVERROR(ENOMEM);
av_log(logger(ctx), AV_LOG_ERROR, "%s malloc enomem\n", ctx->name);
return AVERROR(ENOMEM);
}

for (i = 0; i < req.count; i++) {
Expand Down
3 changes: 2 additions & 1 deletion mythtv/external/FFmpeg/libavcodec/v4l2_m2m_dec.c
Expand Up @@ -227,6 +227,8 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
ret = AVERROR(ENOMEM);
return ret;
}

s->avctx = avctx;
ret = av_hwdevice_ctx_init(s->device_ref);
if (ret < 0)
return ret;
Expand All @@ -239,7 +241,6 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)

return ret;
}
s->avctx = avctx;

return v4l2_prepare_decoder(s);
}
Expand Down

0 comments on commit 253d4df

Please sign in to comment.