MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / need_output

Function need_output

ffmpeg-single-cmd/src/main/cpp/ffmpeg_mod.c:3782–3805  ·  view source on GitHub ↗

Return 1 if there remain streams where more output is wanted, 0 otherwise. */

Source from the content-addressed store, hash-verified

3780
3781/* Return 1 if there remain streams where more output is wanted, 0 otherwise. */
3782static int need_output(void)
3783{
3784 int i;
3785
3786 for (i = 0; i < nb_output_streams; i++) {
3787 OutputStream *ost = output_streams[i];
3788 OutputFile *of = output_files[ost->file_index];
3789 AVFormatContext *os = output_files[ost->file_index]->ctx;
3790
3791 if (ost->finished ||
3792 (os->pb && avio_tell(os->pb) >= of->limit_filesize))
3793 continue;
3794 if (ost->frame_number >= ost->max_frames) {
3795 int j;
3796 for (j = 0; j < of->ctx->nb_streams; j++)
3797 close_output_stream(output_streams[of->ost_index + j]);
3798 continue;
3799 }
3800
3801 return 1;
3802 }
3803
3804 return 0;
3805}
3806
3807/**
3808 * Select the output stream to process.

Callers 1

transcodeFunction · 0.85

Calls 2

close_output_streamFunction · 0.85
avio_tellFunction · 0.50

Tested by

no test coverage detected