History

avcodec/av1_frame_merge_bsf: Passthrough pos in case of no timestamps

This is needed by the AV1-Annex B and AV1-OBU demuxers.

Andreas Rheinhardt committed 5 years ago

Commit 5a3385d1 parent 172116f1 file · +8 −3Browse files

Unified · Split

libavcodec/av1_frame_merge_bsf.c+8−3
@@ -103,10 +103,15 @@ eof: · 102 unmodified lines
103103 err = AVERROR(EAGAIN);
104104 }
105105
106− // Buffer packets with timestamps. There should be at most one per TU, be it split or not.
107− if (!buffer_pkt->data && in->pts != AV_NOPTS_VALUE)
106+ /* Buffer packets with timestamps (there should be at most one per TU)
107+ * or any packet if buffer_pkt is empty. The latter is needed to
108+ * passthrough positions in case there are no timestamps like with
109+ * the raw OBU demuxer. */
110+ if (!buffer_pkt->data ||
111+ in->pts != AV_NOPTS_VALUE && buffer_pkt->pts == AV_NOPTS_VALUE) {
112+ av_packet_unref(buffer_pkt);
108113 av_packet_move_ref(buffer_pkt, in);
109− else
114+ } else
110115 av_packet_unref(in);
111116
112117 ff_cbs_fragment_reset(&ctx->frag[ctx->idx]);

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