mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-24 17:46:51 +01:00
finish removing cabac
This commit is contained in:
@@ -21,7 +21,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
AddPixelFormatColumnCommand();
|
||||
AddBitDepthCommand();
|
||||
AddIsAnamorphicColumn();
|
||||
AddIsCabacColumn();
|
||||
AddKeyFramesColumn();
|
||||
AddRefFramesCommand();
|
||||
AddCodecTagColumn();
|
||||
@@ -215,37 +214,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
_connection.RunQueries(new[] { builder.ToString() }, _logger);
|
||||
}
|
||||
|
||||
private void AddIsCabacColumn()
|
||||
{
|
||||
using (var cmd = _connection.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "PRAGMA table_info(mediastreams)";
|
||||
|
||||
using (var reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess | CommandBehavior.SingleResult))
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsDBNull(1))
|
||||
{
|
||||
var name = reader.GetString(1);
|
||||
|
||||
if (string.Equals(name, "IsCabac", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var builder = new StringBuilder();
|
||||
|
||||
builder.AppendLine("alter table mediastreams");
|
||||
builder.AppendLine("add column IsCabac BIT NULL");
|
||||
|
||||
_connection.RunQueries(new[] { builder.ToString() }, _logger);
|
||||
}
|
||||
|
||||
private void AddKeyFramesColumn()
|
||||
{
|
||||
using (var cmd = _connection.CreateCommand())
|
||||
|
||||
Reference in New Issue
Block a user