Update src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs

Co-authored-by: Bogdan <mynameisbogdan@users.noreply.github.com>
This commit is contained in:
realzombee 2026-01-28 18:38:59 +00:00 committed by GitHub
parent af148cbd4d
commit 0a7cd26eeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,8 +118,7 @@ public MediaInfoModel GetMediaInfo(string filename)
if (PqTransferFunctions.Contains(mediaInfoModel.VideoTransferCharacteristics))
{
var videoStreamIndex = analysis.VideoStreams.FindIndex(stream => stream.Index == primaryVideoStream?.Index);
videoStreamIndex = videoStreamIndex == -1 ? 0 : videoStreamIndex;
var frameOutput = FFProbe.GetFrameJson(filename, ffOptions: new () { ExtraArguments = $"-read_intervals \"%+#1\" -select_streams v:{videoStreamIndex}" });
var frameOutput = FFProbe.GetFrameJson(filename, ffOptions: new () { ExtraArguments = $"-read_intervals \"%+#1\" -select_streams v:{(videoStreamIndex == -1 ? 0 : videoStreamIndex)}" });
mediaInfoModel.RawFrameData = frameOutput;
frames = FFProbe.AnalyseFrameJson(frameOutput);