diff mbox

[FFmpeg-devel] lavc/mediacodecdec: remove mediacodec_process_data() indirection

Message ID 20180103121712.5019-1-matthieu.bouron@gmail.com
State New
Headers show

Commit Message

Matthieu Bouron Jan. 3, 2018, 12:17 p.m. UTC
---
 libavcodec/mediacodecdec.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Aman Karmani Jan. 4, 2018, 12:53 a.m. UTC | #1
On Wed, Jan 3, 2018 at 4:17 AM, Matthieu Bouron <matthieu.bouron@gmail.com>
wrote:

> ---
>  libavcodec/mediacodecdec.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
> index b698ceaef9..c0e91c9429 100644
> --- a/libavcodec/mediacodecdec.c
> +++ b/libavcodec/mediacodecdec.c
> @@ -415,15 +415,6 @@ done:
>      return ret;
>  }
>
> -
> -static int mediacodec_process_data(AVCodecContext *avctx, AVFrame *frame,
> -                                   int *got_frame, AVPacket *pkt)
> -{
> -    MediaCodecH264DecContext *s = avctx->priv_data;
> -
> -    return ff_mediacodec_dec_decode(avctx, s->ctx, frame, got_frame,
> pkt);
> -}
> -
>  static int mediacodec_decode_frame(AVCodecContext *avctx, void *data,
>                                     int *got_frame, AVPacket *avpkt)
>  {
> @@ -489,7 +480,7 @@ static int mediacodec_decode_frame(AVCodecContext
> *avctx, void *data,
>              av_fifo_generic_read(s->fifo, &s->buffered_pkt,
> sizeof(s->buffered_pkt), NULL);
>          }
>
> -        ret = mediacodec_process_data(avctx, frame, got_frame,
> &s->buffered_pkt);
> +        ret = ff_mediacodec_dec_decode(avctx, s->ctx, frame, got_frame,
> &s->buffered_pkt);
>          if (ret < 0)
>              return ret;
>

LGTM


>
> --
> 2.15.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Matthieu Bouron Jan. 6, 2018, 9:18 p.m. UTC | #2
On Wed, Jan 03, 2018 at 04:53:07PM -0800, Aman Gupta wrote:
> On Wed, Jan 3, 2018 at 4:17 AM, Matthieu Bouron <matthieu.bouron@gmail.com>
> wrote:
> 
> > ---
> >  libavcodec/mediacodecdec.c | 11 +----------
> >  1 file changed, 1 insertion(+), 10 deletions(-)
> >
> > diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
> > index b698ceaef9..c0e91c9429 100644
> > --- a/libavcodec/mediacodecdec.c
> > +++ b/libavcodec/mediacodecdec.c
> > @@ -415,15 +415,6 @@ done:
> >      return ret;
> >  }
> >
> > -
> > -static int mediacodec_process_data(AVCodecContext *avctx, AVFrame *frame,
> > -                                   int *got_frame, AVPacket *pkt)
> > -{
> > -    MediaCodecH264DecContext *s = avctx->priv_data;
> > -
> > -    return ff_mediacodec_dec_decode(avctx, s->ctx, frame, got_frame,
> > pkt);
> > -}
> > -
> >  static int mediacodec_decode_frame(AVCodecContext *avctx, void *data,
> >                                     int *got_frame, AVPacket *avpkt)
> >  {
> > @@ -489,7 +480,7 @@ static int mediacodec_decode_frame(AVCodecContext
> > *avctx, void *data,
> >              av_fifo_generic_read(s->fifo, &s->buffered_pkt,
> > sizeof(s->buffered_pkt), NULL);
> >          }
> >
> > -        ret = mediacodec_process_data(avctx, frame, got_frame,
> > &s->buffered_pkt);
> > +        ret = ff_mediacodec_dec_decode(avctx, s->ctx, frame, got_frame,
> > &s->buffered_pkt);
> >          if (ret < 0)
> >              return ret;
> >
> 
> LGTM

Patch applied.
diff mbox

Patch

diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index b698ceaef9..c0e91c9429 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -415,15 +415,6 @@  done:
     return ret;
 }
 
-
-static int mediacodec_process_data(AVCodecContext *avctx, AVFrame *frame,
-                                   int *got_frame, AVPacket *pkt)
-{
-    MediaCodecH264DecContext *s = avctx->priv_data;
-
-    return ff_mediacodec_dec_decode(avctx, s->ctx, frame, got_frame, pkt);
-}
-
 static int mediacodec_decode_frame(AVCodecContext *avctx, void *data,
                                    int *got_frame, AVPacket *avpkt)
 {
@@ -489,7 +480,7 @@  static int mediacodec_decode_frame(AVCodecContext *avctx, void *data,
             av_fifo_generic_read(s->fifo, &s->buffered_pkt, sizeof(s->buffered_pkt), NULL);
         }
 
-        ret = mediacodec_process_data(avctx, frame, got_frame, &s->buffered_pkt);
+        ret = ff_mediacodec_dec_decode(avctx, s->ctx, frame, got_frame, &s->buffered_pkt);
         if (ret < 0)
             return ret;