diff mbox

[FFmpeg-devel,2/2] avcodec/decode: remove ff_init_buffer_info()

Message ID 20180214001801.6546-2-jamrial@gmail.com
State Accepted
Headers show

Commit Message

James Almer Feb. 14, 2018, 12:18 a.m. UTC
It's a duplicate function.

This reduces differences with libav.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/decode.c   | 9 ++-------
 libavcodec/internal.h | 6 ------
 2 files changed, 2 insertions(+), 13 deletions(-)
diff mbox

Patch

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 56be9f6064..ea2168ad0c 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -130,7 +130,7 @@  static int extract_packet_props(AVCodecInternal *avci, const AVPacket *pkt)
     if (pkt) {
         ret = av_packet_copy_props(avci->last_pkt_props, pkt);
         if (!ret)
-            avci->last_pkt_props->size = pkt->size; // HACK: Needed for ff_init_buffer_info().
+            avci->last_pkt_props->size = pkt->size; // HACK: Needed for ff_decode_frame_props().
     }
     return ret;
 }
@@ -1661,7 +1661,7 @@  static int add_metadata_from_side_data(const AVPacket *avpkt, AVFrame *frame)
     return av_packet_unpack_dictionary(side_metadata, size, frame_md);
 }
 
-int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
+int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
 {
     const AVPacket *pkt = avctx->internal->last_pkt_props;
     int i;
@@ -1769,11 +1769,6 @@  FF_ENABLE_DEPRECATION_WARNINGS
     return 0;
 }
 
-int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
-{
-    return ff_init_buffer_info(avctx, frame);
-}
-
 static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame)
 {
     if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 16bd101284..bb92873d7b 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -235,12 +235,6 @@  int ff_match_2uint16(const uint16_t (*tab)[2], int size, int a, int b);
 
 unsigned int avpriv_toupper4(unsigned int x);
 
-/**
- * does needed setup of pkt_pts/pos and such for (re)get_buffer();
- */
-int ff_init_buffer_info(AVCodecContext *s, AVFrame *frame);
-
-
 void ff_color_frame(AVFrame *frame, const int color[4]);
 
 /**