aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-02-13 18:42:04 -0300
committerJames Almer <jamrial@gmail.com>2018-02-14 20:54:20 -0300
commit23e1bf6e51106f54ab75551ccc98361b83ba55fe (patch)
tree8ce677d52fe2383b204234a5fc02f3dc5692c352
parent3b4026e15110547892d5d770b6b43c9e34df458f (diff)
downloadffmpeg-23e1bf6e51106f54ab75551ccc98361b83ba55fe.tar.gz
avcodec: remove unnecessary calls to ff_init_buffer_info()
And remove the function altogether while at it. It's a duplicate of another. Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/decode.c11
-rw-r--r--libavcodec/internal.h6
-rw-r--r--libavcodec/pthread_frame.c2
-rw-r--r--libavcodec/smvjpegdec.c1
4 files changed, 2 insertions, 18 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 522720c07a..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) {
@@ -1916,8 +1911,6 @@ static int reget_buffer_internal(AVCodecContext *avctx, AVFrame *frame)
av_frame_unref(frame);
}
- ff_init_buffer_info(avctx, frame);
-
if (!frame->data[0])
return ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF);
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]);
/**
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 25aa3e2cd2..5104b1beba 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -886,8 +886,6 @@ static int thread_get_buffer_internal(AVCodecContext *avctx, ThreadFrame *f, int
f->owner[0] = f->owner[1] = avctx;
- ff_init_buffer_info(avctx, f->f);
-
if (!(avctx->active_thread_type & FF_THREAD_FRAME))
return ff_get_buffer(avctx, f->f, flags);
diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c
index 018e135b30..0b05d19f7b 100644
--- a/libavcodec/smvjpegdec.c
+++ b/libavcodec/smvjpegdec.c
@@ -193,7 +193,6 @@ static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_siz
s->picture[1]->width = avctx->width;
s->picture[1]->height = avctx->height;
s->picture[1]->format = avctx->pix_fmt;
- /* ff_init_buffer_info(avctx, &s->picture[1]); */
smv_img_pnt(s->picture[1]->data, mjpeg_data->data, mjpeg_data->linesize,
avctx->pix_fmt, avctx->width, avctx->height, cur_frame);
for (i = 0; i < AV_NUM_DATA_POINTERS; i++)