diff mbox

[FFmpeg-devel,2/2] mpeg4_unpack_bframes: Merge close and flush

Message ID 20190710210827.20409-2-andreas.rheinhardt@gmail.com
State Accepted
Commit fee1bffbc26ea6c39e11db0c58f3df9dd8fa84bd
Headers show

Commit Message

Andreas Rheinhardt July 10, 2019, 9:08 p.m. UTC
They are identical now.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/mpeg4_unpack_bframes_bsf.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

Comments

Michael Niedermayer July 12, 2019, 9:27 p.m. UTC | #1
On Wed, Jul 10, 2019 at 11:08:27PM +0200, Andreas Rheinhardt wrote:
> They are identical now.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/mpeg4_unpack_bframes_bsf.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/libavcodec/mpeg4_unpack_bframes_bsf.c b/libavcodec/mpeg4_unpack_bframes_bsf.c
> index 382070b423..1500d2135d 100644
> --- a/libavcodec/mpeg4_unpack_bframes_bsf.c
> +++ b/libavcodec/mpeg4_unpack_bframes_bsf.c
> @@ -145,13 +145,7 @@ static int mpeg4_unpack_bframes_init(AVBSFContext *ctx)
>      return 0;
>  }
>  
> -static void mpeg4_unpack_bframes_flush(AVBSFContext *bsfc)
> -{
> -    UnpackBFramesBSFContext *ctx = bsfc->priv_data;
> -    av_buffer_unref(&ctx->b_frame_ref);
> -}
> -
> -static void mpeg4_unpack_bframes_close(AVBSFContext *bsfc)
> +static void mpeg4_unpack_bframes_close_flush(AVBSFContext *bsfc)
>  {

LGTM

thx

[...]
diff mbox

Patch

diff --git a/libavcodec/mpeg4_unpack_bframes_bsf.c b/libavcodec/mpeg4_unpack_bframes_bsf.c
index 382070b423..1500d2135d 100644
--- a/libavcodec/mpeg4_unpack_bframes_bsf.c
+++ b/libavcodec/mpeg4_unpack_bframes_bsf.c
@@ -145,13 +145,7 @@  static int mpeg4_unpack_bframes_init(AVBSFContext *ctx)
     return 0;
 }
 
-static void mpeg4_unpack_bframes_flush(AVBSFContext *bsfc)
-{
-    UnpackBFramesBSFContext *ctx = bsfc->priv_data;
-    av_buffer_unref(&ctx->b_frame_ref);
-}
-
-static void mpeg4_unpack_bframes_close(AVBSFContext *bsfc)
+static void mpeg4_unpack_bframes_close_flush(AVBSFContext *bsfc)
 {
     UnpackBFramesBSFContext *ctx = bsfc->priv_data;
     av_buffer_unref(&ctx->b_frame_ref);
@@ -166,7 +160,7 @@  const AVBitStreamFilter ff_mpeg4_unpack_bframes_bsf = {
     .priv_data_size = sizeof(UnpackBFramesBSFContext),
     .init           = mpeg4_unpack_bframes_init,
     .filter         = mpeg4_unpack_bframes_filter,
-    .flush          = mpeg4_unpack_bframes_flush,
-    .close          = mpeg4_unpack_bframes_close,
+    .flush          = mpeg4_unpack_bframes_close_flush,
+    .close          = mpeg4_unpack_bframes_close_flush,
     .codec_ids      = codec_ids,
 };