summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-10-14 17:02:15 +0200
committerCarl Hetherington <cth@carlh.net>2025-10-15 22:33:26 +0200
commit2d8d05c2e7ad67ebac2ff250670a219a891d09ca (patch)
treed26660275365ab7e3576723a0ef7fd2d3f69406b /src/lib/ffmpeg_decoder.cc
parent4be14646eeb80bf51a6a86bf708446179a0416e9 (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_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 74836c1a8..024b87391 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -528,7 +528,7 @@ FFmpegDecoder::process_audio_frame (shared_ptr<FFmpegAudioStream> stream)
"Crazy timestamp {} for {} samples in stream {} (ts={} tb={}, off={})",
to_string(ct),
data->frames(),
- stream->id(),
+ stream->identifier(),
frame->best_effort_timestamp,
av_q2d(time_base),
to_string(_pts_offset)