early-access version 1680
This commit is contained in:
8
externals/ffmpeg/libavcodec/v4l2_m2m.c
vendored
8
externals/ffmpeg/libavcodec/v4l2_m2m.c
vendored
@@ -329,6 +329,7 @@ static void v4l2_m2m_destroy_context(void *opaque, uint8_t *context)
|
||||
sem_destroy(&s->refsync);
|
||||
|
||||
close(s->fd);
|
||||
av_frame_free(&s->frame);
|
||||
|
||||
av_free(s);
|
||||
}
|
||||
@@ -415,5 +416,12 @@ int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **s)
|
||||
priv->context->self_ref = priv->context_ref;
|
||||
priv->context->fd = -1;
|
||||
|
||||
priv->context->frame = av_frame_alloc();
|
||||
if (!priv->context->frame) {
|
||||
av_buffer_unref(&priv->context_ref);
|
||||
*s = NULL; /* freed when unreferencing context_ref */
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user