Revert "avcodec/decode: use a packet list to store packet properties"

The idea behind last_pkt_props was to store the properties of the last packet
fed to the decoder. Any sort of queueing required by CODEC_CAP_DELAY decoders
that consume several packets before they start outputting frames should be done
by the decoders in question. An example of this is libdav1d.

This is required for the following commits that will fix last_pkt_props in
frame threading scenarios, as well as maintain its contents during flush.

This revers commit 022a12b306.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2022-12-04 14:53:13 -03:00
parent c06e88e05c
commit b1fdb0b347
4 changed files with 8 additions and 52 deletions

View File

@@ -386,9 +386,6 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
av_frame_unref(avci->recon_frame);
} else {
av_packet_unref(avci->last_pkt_props);
while (av_fifo_read(avci->pkt_props, avci->last_pkt_props, 1) >= 0)
av_packet_unref(avci->last_pkt_props);
av_packet_unref(avci->in_pkt);
avctx->pts_correction_last_pts =
@@ -453,13 +450,6 @@ av_cold int avcodec_close(AVCodecContext *avctx)
av_freep(&avci->byte_buffer);
av_frame_free(&avci->buffer_frame);
av_packet_free(&avci->buffer_pkt);
if (avci->pkt_props) {
while (av_fifo_can_read(avci->pkt_props)) {
av_packet_unref(avci->last_pkt_props);
av_fifo_read(avci->pkt_props, avci->last_pkt_props, 1);
}
av_fifo_freep2(&avci->pkt_props);
}
av_packet_free(&avci->last_pkt_props);
av_packet_free(&avci->in_pkt);