diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-10-14 17:02:15 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-10-15 22:33:26 +0200 |
| commit | 2d8d05c2e7ad67ebac2ff250670a219a891d09ca (patch) | |
| tree | d26660275365ab7e3576723a0ef7fd2d3f69406b /src/lib/ffmpeg_examiner.h | |
| parent | 4be14646eeb80bf51a6a86bf708446179a0416e9 (diff) | |
Disable use of stream IDs if there are duplicates, rather than rewriting.
It turns out that FFmpeg decoders (e.g. flv, see FFmpeg
25faaa311a74efdfdc4fed56996d7338ed807488) check stream IDs and sometimes
create new streams if they see one that they didn't see before. If we
change stream IDs we break this.
Here we try to use stream indices in cases where the IDs are duplicated.
We also account for the case where a new stream appears during
examination. This wasn't covered by tests until the FFmpeg commit
mentioned above, were the flv decoder creates a new stream during
examination of boon_telly.mkv.
Diffstat (limited to 'src/lib/ffmpeg_examiner.h')
| -rw-r--r-- | src/lib/ffmpeg_examiner.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_examiner.h b/src/lib/ffmpeg_examiner.h index 3dd79b2b5..65fa9cb5c 100644 --- a/src/lib/ffmpeg_examiner.h +++ b/src/lib/ffmpeg_examiner.h @@ -91,6 +91,7 @@ public: private: bool video_packet(AVCodecContext* context, std::string& temporal_reference, AVPacket* packet); bool audio_packet(AVCodecContext* context, std::shared_ptr<FFmpegAudioStream>, AVPacket* packet); + void check_for_duplicate_ids(); std::string stream_name(AVStream* s) const; std::string subtitle_stream_name(AVStream* s) const; |
