diff mbox series

[FFmpeg-devel,04/41] avcodec/v4l2_m2m: Remove unused ff_v4l2_m2m_codec_full_reinit

Message ID DB6PR0101MB22144918A3405C40664447FE8FA79@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Accepted
Commit ae2dd5d42b04e287f1200c049db0a6febd229dc0
Headers show
Series Stop including superseded functions for x64 | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt June 9, 2022, 11:54 p.m. UTC
Unused since df701ed0b582a6b5c763310b4225446089cbcfb1.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/v4l2_m2m.c | 76 -------------------------------------------
 1 file changed, 76 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
index 3178ef06b8..51932baf84 100644
--- a/libavcodec/v4l2_m2m.c
+++ b/libavcodec/v4l2_m2m.c
@@ -244,82 +244,6 @@  int ff_v4l2_m2m_codec_reinit(V4L2m2mContext *s)
     return 0;
 }
 
-int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *s)
-{
-    void *log_ctx = s->avctx;
-    int ret;
-
-    av_log(log_ctx, AV_LOG_DEBUG, "%s full reinit\n", s->devname);
-
-    /* wait for pending buffer references */
-    if (atomic_load(&s->refcount))
-        while(sem_wait(&s->refsync) == -1 && errno == EINTR);
-
-    ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMOFF);
-    if (ret) {
-        av_log(log_ctx, AV_LOG_ERROR, "output VIDIOC_STREAMOFF\n");
-        goto error;
-    }
-
-    ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF);
-    if (ret) {
-        av_log(log_ctx, AV_LOG_ERROR, "capture VIDIOC_STREAMOFF\n");
-        goto error;
-    }
-
-    /* release and unmmap the buffers */
-    ff_v4l2_context_release(&s->output);
-    ff_v4l2_context_release(&s->capture);
-
-    /* start again now that we know the stream dimensions */
-    s->draining = 0;
-    s->reinit = 0;
-
-    ret = ff_v4l2_context_get_format(&s->output, 0);
-    if (ret) {
-        av_log(log_ctx, AV_LOG_DEBUG, "v4l2 output format not supported\n");
-        goto error;
-    }
-
-    ret = ff_v4l2_context_get_format(&s->capture, 0);
-    if (ret) {
-        av_log(log_ctx, AV_LOG_DEBUG, "v4l2 capture format not supported\n");
-        goto error;
-    }
-
-    ret = ff_v4l2_context_set_format(&s->output);
-    if (ret) {
-        av_log(log_ctx, AV_LOG_ERROR, "can't set v4l2 output format\n");
-        goto error;
-    }
-
-    ret = ff_v4l2_context_set_format(&s->capture);
-    if (ret) {
-        av_log(log_ctx, AV_LOG_ERROR, "can't to set v4l2 capture format\n");
-        goto error;
-    }
-
-    ret = ff_v4l2_context_init(&s->output);
-    if (ret) {
-        av_log(log_ctx, AV_LOG_ERROR, "no v4l2 output context's buffers\n");
-        goto error;
-    }
-
-    /* decoder's buffers need to be updated at a later stage */
-    if (s->avctx && !av_codec_is_decoder(s->avctx->codec)) {
-        ret = ff_v4l2_context_init(&s->capture);
-        if (ret) {
-            av_log(log_ctx, AV_LOG_ERROR, "no v4l2 capture context's buffers\n");
-            goto error;
-        }
-    }
-
-    return 0;
-
-error:
-    return ret;
-}
-
 static void v4l2_m2m_destroy_context(void *opaque, uint8_t *context)
 {
     V4L2m2mContext *s = (V4L2m2mContext*)context;