diff --git a/ffmpeg.c b/ffmpeg.c index d9b8c0bfff..76094575c9 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -692,13 +692,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) &new_pkt.data, &new_pkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY); -FF_DISABLE_DEPRECATION_WARNINGS - if(a == 0 && new_pkt.data != pkt->data -#if FF_API_DESTRUCT_PACKET - && new_pkt.destruct -#endif - ) { -FF_ENABLE_DEPRECATION_WARNINGS + if(a == 0 && new_pkt.data != pkt->data) { uint8_t *t = av_malloc(new_pkt.size + AV_INPUT_BUFFER_PADDING_SIZE); //the new should be a subset of the old so cannot overflow if(t) { memcpy(t, new_pkt.data, new_pkt.size); diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 7b2df14a37..32fa51f24f 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -208,13 +208,7 @@ int av_dup_packet(AVPacket *pkt) { AVPacket tmp_pkt; -FF_DISABLE_DEPRECATION_WARNINGS - if (!pkt->buf && pkt->data -#if FF_API_DESTRUCT_PACKET - && !pkt->destruct -#endif - ) { -FF_ENABLE_DEPRECATION_WARNINGS + if (!pkt->buf && pkt->data) { tmp_pkt = *pkt; return copy_packet_data(pkt, &tmp_pkt, 1); } @@ -330,11 +324,6 @@ int av_packet_merge_side_data(AVPacket *pkt){ return AVERROR(ENOMEM); pkt->buf = buf; pkt->data = p = buf->data; -#if FF_API_DESTRUCT_PACKET -FF_DISABLE_DEPRECATION_WARNINGS - pkt->destruct = dummy_destruct_packet; -FF_ENABLE_DEPRECATION_WARNINGS -#endif pkt->size = size - AV_INPUT_BUFFER_PADDING_SIZE; bytestream_put_buffer(&p, old.data, old.size); for (i=old.side_data_elems-1; i>=0; i--) { diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 729df1187e..03a4a5e1c2 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1797,11 +1797,6 @@ int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64 av_fast_padded_malloc(&avctx->internal->byte_buffer, &avctx->internal->byte_buffer_size, size); avpkt->data = avctx->internal->byte_buffer; avpkt->size = avctx->internal->byte_buffer_size; -#if FF_API_DESTRUCT_PACKET -FF_DISABLE_DEPRECATION_WARNINGS - avpkt->destruct = NULL; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } } @@ -1972,11 +1967,6 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, } avpkt->buf = user_pkt.buf; avpkt->data = user_pkt.data; -#if FF_API_DESTRUCT_PACKET -FF_DISABLE_DEPRECATION_WARNINGS - avpkt->destruct = user_pkt.destruct; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } else { if (av_dup_packet(avpkt) < 0) { ret = AVERROR(ENOMEM); @@ -2197,11 +2187,6 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx, } avpkt->buf = user_pkt.buf; avpkt->data = user_pkt.data; -#if FF_API_DESTRUCT_PACKET -FF_DISABLE_DEPRECATION_WARNINGS - avpkt->destruct = user_pkt.destruct; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } else { if (av_dup_packet(avpkt) < 0) { ret = AVERROR(ENOMEM); diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c index 8ee834e07e..c45ae9ae5c 100644 --- a/libavdevice/iec61883.c +++ b/libavdevice/iec61883.c @@ -198,11 +198,6 @@ static int iec61883_parse_queue_dv(struct iec61883_data *dv, AVPacket *pkt) size = avpriv_dv_produce_packet(dv->dv_demux, pkt, packet->buf, packet->len, -1); -#if FF_API_DESTRUCT_PACKET -FF_DISABLE_DEPRECATION_WARNINGS - pkt->destruct = av_destruct_packet; -FF_ENABLE_DEPRECATION_WARNINGS -#endif dv->queue_first = packet->next; av_free(packet); dv->packets--; diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index a30b7d7212..7c31cfaee4 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -1420,11 +1420,6 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt) } asf_st->frag_offset = 0; *pkt = asf_st->pkt; -#if FF_API_DESTRUCT_PACKET -FF_DISABLE_DEPRECATION_WARNINGS - asf_st->pkt.destruct = NULL; -FF_ENABLE_DEPRECATION_WARNINGS -#endif asf_st->pkt.buf = 0; asf_st->pkt.size = 0; asf_st->pkt.data = 0; diff --git a/libavformat/mux.c b/libavformat/mux.c index a57b69642c..f2c137fa9e 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1059,11 +1059,6 @@ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt, pkt->buf = local_pkt.buf; pkt->side_data = local_pkt.side_data; pkt->side_data_elems = local_pkt.side_data_elems; -#if FF_API_DESTRUCT_PACKET -FF_DISABLE_DEPRECATION_WARNINGS - pkt->destruct = local_pkt.destruct; -FF_ENABLE_DEPRECATION_WARNINGS -#endif return ret; } diff --git a/libavformat/tee.c b/libavformat/tee.c index bc2e522f7c..c619eae5db 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -396,13 +396,7 @@ static int filter_packet(void *log_ctx, AVPacket *pkt, &new_pkt.data, &new_pkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY); -FF_DISABLE_DEPRECATION_WARNINGS - if (ret == 0 && new_pkt.data != pkt->data -#if FF_API_DESTRUCT_PACKET - && new_pkt.destruct -#endif - ) { -FF_ENABLE_DEPRECATION_WARNINGS + if (ret == 0 && new_pkt.data != pkt->data) { if ((ret = av_copy_packet(&new_pkt, pkt)) < 0) break; ret = 1;