History

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 022a12b306ab2096e6ac9fc9b149828a849d65b2.

James Almer committed 3 years ago

Commit b1fdb0b1 parent c06e88e4 files · +8 −52Browse files

Showing the changes to libavcodec/avcodec.c (1 of 4 files). Show all

Unified · Split

libavcodec/avcodec.c+0−10
@@ -386,9 +386,6 @@ void avcodec_flush_buffers(AVCodecContext *avctx) · 385 unmodified lines
386386 av_frame_unref(avci->recon_frame);
387387 } else {
388388 av_packet_unref(avci->last_pkt_props);
389− while (av_fifo_read(avci->pkt_props, avci->last_pkt_props, 1) >= 0)
390− av_packet_unref(avci->last_pkt_props);
391−
392389 av_packet_unref(avci->in_pkt);
393390
394391 avctx->pts_correction_last_pts =
@@ -453,13 +450,6 @@ av_cold int avcodec_close(AVCodecContext *avctx) · 58 unmodified lines
453450 av_freep(&avci->byte_buffer);
454451 av_frame_free(&avci->buffer_frame);
455452 av_packet_free(&avci->buffer_pkt);
456− if (avci->pkt_props) {
457− while (av_fifo_can_read(avci->pkt_props)) {
458− av_packet_unref(avci->last_pkt_props);
459− av_fifo_read(avci->pkt_props, avci->last_pkt_props, 1);
460− }
461− av_fifo_freep2(&avci->pkt_props);
462− }
463453 av_packet_free(&avci->last_pkt_props);
464454
465455 av_packet_free(&avci->in_pkt);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t