aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-02-23 08:20:12 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-09 08:36:40 +0100
commit0f24a3ca999a702f83af9307f9f47b6fdeb546a5 (patch)
treeec0d6be2c0dcfd674d15b11c09fe2fb85dd983bd /libavcodec/utils.c
parentf073b1500e3b53835034b7421db0a1cf5bea05a0 (diff)
downloadffmpeg-0f24a3ca999a702f83af9307f9f47b6fdeb546a5.tar.gz
lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index cc7d6d0150..13efea44c2 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1245,42 +1245,6 @@ end:
return ret;
}
-#if FF_API_OLD_ENCODE_VIDEO
-int attribute_align_arg avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
- const AVFrame *pict)
-{
- AVPacket pkt;
- int ret, got_packet = 0;
-
- if (buf_size < FF_MIN_BUFFER_SIZE) {
- av_log(avctx, AV_LOG_ERROR, "buffer smaller than minimum size\n");
- return -1;
- }
-
- av_init_packet(&pkt);
- pkt.data = buf;
- pkt.size = buf_size;
-
- ret = avcodec_encode_video2(avctx, &pkt, pict, &got_packet);
- if (!ret && got_packet && avctx->coded_frame) {
- avctx->coded_frame->pts = pkt.pts;
- avctx->coded_frame->key_frame = !!(pkt.flags & AV_PKT_FLAG_KEY);
- }
-
- /* free any side data since we cannot return it */
- if (pkt.side_data_elems > 0) {
- int i;
- for (i = 0; i < pkt.side_data_elems; i++)
- av_free(pkt.side_data[i].data);
- av_freep(&pkt.side_data);
- pkt.side_data_elems = 0;
- }
-
- return ret ? ret : pkt.size;
-}
-
-#endif
-
int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
AVPacket *avpkt,
const AVFrame *frame,