mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
fix stream copy requiring a bitrate
This commit is contained in:
parent
c07596dbb4
commit
b4984a78fd
@ -6,6 +6,7 @@ using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.IO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -91,11 +92,11 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||
/// <returns>Task{System.Object}.</returns>
|
||||
public async Task<object> ProcessRequestAsync(StreamState state)
|
||||
{
|
||||
if (!state.VideoRequest.VideoBitRate.HasValue)
|
||||
if (!state.VideoRequest.VideoBitRate.HasValue && (!state.VideoRequest.VideoCodec.HasValue || state.VideoRequest.VideoCodec.Value != VideoCodecs.Copy))
|
||||
{
|
||||
throw new ArgumentException("A video bitrate is required");
|
||||
}
|
||||
if (!state.Request.AudioBitRate.HasValue)
|
||||
if (!state.Request.AudioBitRate.HasValue && (!state.Request.AudioCodec.HasValue || state.Request.AudioCodec.Value != AudioCodecs.Copy))
|
||||
{
|
||||
throw new ArgumentException("An audio bitrate is required");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user