Commit 83a5df54 authored by Hendrik Leppkes's avatar Hendrik Leppkes

Remove left-over FF_API_DESTRUCT_PACKET cruft

parent 87c88122
......@@ -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);
......
......@@ -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--) {
......
......@@ -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);
......
......@@ -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--;
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment