You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
fftools/ffmpeg_demux: only print demuxing stats if demuxing actually started
If the transcoding process never got to reading any packets from this input then printing stats is just pointless noise.
This commit is contained in:
@@ -113,6 +113,8 @@ typedef struct Demuxer {
|
|||||||
int thread_queue_size;
|
int thread_queue_size;
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
int non_blocking;
|
int non_blocking;
|
||||||
|
|
||||||
|
int read_started;
|
||||||
} Demuxer;
|
} Demuxer;
|
||||||
|
|
||||||
typedef struct DemuxMsg {
|
typedef struct DemuxMsg {
|
||||||
@@ -734,6 +736,8 @@ static int thread_start(Demuxer *d)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
d->read_started = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
fail:
|
fail:
|
||||||
av_thread_message_queue_free(&d->in_thread_queue);
|
av_thread_message_queue_free(&d->in_thread_queue);
|
||||||
@@ -833,7 +837,7 @@ void ifile_close(InputFile **pf)
|
|||||||
|
|
||||||
thread_stop(d);
|
thread_stop(d);
|
||||||
|
|
||||||
if (f->ctx)
|
if (d->read_started)
|
||||||
demux_final_stats(d);
|
demux_final_stats(d);
|
||||||
|
|
||||||
for (int i = 0; i < f->nb_streams; i++)
|
for (int i = 0; i < f->nb_streams; i++)
|
||||||
|
Reference in New Issue
Block a user