mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
fix for no audio stream video
This commit is contained in:
parent
6987cb8357
commit
11c74cb65c
@ -1429,6 +1429,11 @@ namespace Jellyfin.Api.Controllers
|
||||
|
||||
private string GetAudioArguments(StreamState state, EncodingOptions encodingOptions)
|
||||
{
|
||||
if (state.AudioStream == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var audioCodec = _encodingHelper.GetAudioEncoder(state);
|
||||
|
||||
if (!state.IsOutputVideo)
|
||||
|
@ -1518,6 +1518,11 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
/// <returns>System.Nullable{System.Int32}.</returns>
|
||||
public int? GetNumAudioChannelsParam(EncodingJobInfo state, MediaStream audioStream, string outputAudioCodec)
|
||||
{
|
||||
if (audioStream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var request = state.BaseRequest;
|
||||
|
||||
var inputChannels = audioStream?.Channels;
|
||||
|
@ -593,6 +593,11 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
if (VideoStream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (EncodingHelper.IsCopyCodec(OutputVideoCodec))
|
||||
{
|
||||
return VideoStream?.Codec;
|
||||
@ -606,6 +611,11 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
if (AudioStream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (EncodingHelper.IsCopyCodec(OutputAudioCodec))
|
||||
{
|
||||
return AudioStream?.Codec;
|
||||
|
Loading…
Reference in New Issue
Block a user