fftools/ffmpeg_demux: switch from AVThreadMessageQueue to ThreadQueue
* the code is made shorter and simpler * avoids constantly allocating and freeing AVPackets, thanks to ThreadQueue integration with ObjPool * is consistent with decoding/filtering/muxing * reduces the diff in the future switch to thread-aware scheduling This makes ifile_get_packet() always block. Any potential issues caused by this will be resolved by the switch to thread-aware scheduling in future commits.
This commit is contained in:
@@ -2010,9 +2010,8 @@ static int choose_input(const FilterGraph *fg, const FilterGraphThread *fgt)
|
||||
for (int i = 0; i < fg->nb_inputs; i++) {
|
||||
InputFilter *ifilter = fg->inputs[i];
|
||||
InputFilterPriv *ifp = ifp_from_ifilter(ifilter);
|
||||
InputStream *ist = ifp->ist;
|
||||
|
||||
if (input_files[ist->file_index]->eagain || fgt->eof_in[i])
|
||||
if (fgt->eof_in[i])
|
||||
continue;
|
||||
|
||||
nb_requests = av_buffersrc_get_nb_failed_requests(ifp->filter);
|
||||
@@ -2022,6 +2021,8 @@ static int choose_input(const FilterGraph *fg, const FilterGraphThread *fgt)
|
||||
}
|
||||
}
|
||||
|
||||
av_assert0(best_input >= 0);
|
||||
|
||||
return best_input;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user