History

fftools/ffmpeg_demux: set stream index right before sending packet to scheduler

This avoids assuming that it survives unchanged through bitstream filters, if present.

Anton Khirnov committed 2 years ago

Commit 05fc6d31 parent 8c2e86c1 file · +2 −3Browse files

Unified · Split

fftools/ffmpeg_demux.c+2−3
@@ -475,8 +475,6 @@ static int input_packet_process(Demuxer *d, AVPacket *pkt, unsigned *send_flags) · 474 unmodified lines
475475 av_ts2str(f->ts_offset), av_ts2timestr(f->ts_offset, &AV_TIME_BASE_Q));
476476 }
477477
478− pkt->stream_index = ds->sch_idx_stream;
479−
480478 return 0;
481479 }
482480
@@ -505,6 +503,8 @@ static int do_send(Demuxer *d, DemuxStream *ds, AVPacket *pkt, unsigned flags, · 22 unmodified lines
505503 {
506504 int ret;
507505
506+ pkt->stream_index = ds->sch_idx_stream;
507+
508508 ret = sch_demux_send(d->sch, d->f.index, pkt, flags);
509509 if (ret == AVERROR_EOF) {
510510 av_packet_unref(pkt);
@@ -546,7 +546,6 @@ static int demux_send(Demuxer *d, DemuxThreadContext *dt, DemuxStream *ds, · 35 unmodified lines
546546
547547 d->pkt_heartbeat->pts = pkt->pts;
548548 d->pkt_heartbeat->time_base = pkt->time_base;
549− d->pkt_heartbeat->stream_index = ds1->sch_idx_stream;
550549 d->pkt_heartbeat->opaque = (void*)(intptr_t)PKT_OPAQUE_SUB_HEARTBEAT;
551550
552551 ret = do_send(d, ds1, d->pkt_heartbeat, 0, "heartbeat");

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