diff options
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 7e749c656..322553586 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -724,3 +724,26 @@ FFmpegContent::take_settings_from(shared_ptr<const Content> c) _filters = fc->_filters; } + +void +FFmpegContent::remove_stream_ids() +{ + int index = 0; + + if (audio) { + for (auto stream: audio->streams()) { + if (auto ffmpeg = dynamic_pointer_cast<FFmpegAudioStream>(stream)) { + ffmpeg->unset_id(); + ffmpeg->set_index(index++); + } + } + } + + for (auto stream: _subtitle_streams) { + if (auto ffmpeg = dynamic_pointer_cast<FFmpegSubtitleStream>(stream)) { + ffmpeg->unset_id(); + ffmpeg->set_index(index++); + } + } +} + |
