Files
lpms/ffmpeg
Michal Adamczak c7121378ee Demuxer reopening fixes
This is quite deep and important change. Thing is, old code had
"demuxer reuse" attempt. And unfortunately it neither made sense
(next to nothing performance improvement, complex code, limited
to MPEGTS streams), nor was working fine.

During Low Latency work I tried to eliminate demuxer reusing
because I wanted single demuxer logic to make input I/O plug-in
easier. It turned out that so modified code failed certain tests
such as Nvidia_AudioOnly.

It took me a great deal of debugging, but I found out that there
is bug in demuxer reuse procedure: namely only first muxer open
attempt _really_ checks what is in the segment provided, the rest
just assumes that same streams are there.

So basically, in the series of "audio/video"/"audio without video"
/"audio/video" segments all will be perceived as containing video!
This "patched over" *AudioOnly tests, and let them run, but only
because Transcoder "though" that it has video all the time.

And this simply wasn't true. When I removed "muxer reusing" code,
the Nvidia-dedicated "preserve video decoder" tactics was falling
over the fact that pixel format changed (because it changed from
AV_PIX_FMT_SOMETHING into AV_PIX_FMT_NONE) and tried to create
hardware video decoder for AV_PIX_FMT_NONE, and failed.

Fixing all that finally allowed me to get rid of recursive call to
open_input when HW decoder needs to be reset. Which is good.

During the work on this commit I also noticed that various pieces
of code here and there assume that video stream is always there.
Which is not true, and never was (for example, some tests were
using segments without video in the middle of transcode sequence,
and it worked only because Transcoder "failed to notice" there is
no video anymore). So the whole code was carefully tested and
examined against this dangerous assumption and checks were added.

These changes, in turn, allowed to remove the limitations that
allowed the Transcoder to start only with segments containing
video. Transcoder will now happily process audio-only segments.
2022-07-23 18:17:13 +02:00
..
2022-07-23 18:17:13 +02:00
2022-07-23 18:17:13 +02:00
2022-07-23 18:17:13 +02:00
2021-10-26 17:06:59 +05:00
2022-07-23 18:17:13 +02:00
2022-07-23 18:06:48 +02:00
2022-07-23 18:06:48 +02:00
2018-01-30 11:48:21 -08:00
2022-07-23 18:17:13 +02:00
2022-07-23 18:17:13 +02:00
2022-07-23 18:17:13 +02:00
2022-07-23 18:17:13 +02:00
2022-06-16 08:33:10 +02:00
2022-07-23 18:17:13 +02:00
2022-07-23 18:17:13 +02:00