fix other usage of tryGrabTags

This commit is contained in:
johnpyp 2023-12-21 20:57:08 -08:00
parent 600e289643
commit f5cb1ce782
No known key found for this signature in database
GPG key ID: CA93ADD29044F419

View file

@ -99,6 +99,7 @@ function tryGrabTags(rawTagData, ...tags) {
} }
function parseMediaStreamInfo(stream, all_streams, total_bit_rate) { function parseMediaStreamInfo(stream, all_streams, total_bit_rate) {
const tagData = { ffprobe: stream.tags }
var info = { var info = {
index: stream.index, index: stream.index,
type: stream.codec_type, type: stream.codec_type,
@ -107,8 +108,8 @@ function parseMediaStreamInfo(stream, all_streams, total_bit_rate) {
codec_time_base: stream.codec_time_base || null, codec_time_base: stream.codec_time_base || null,
time_base: stream.time_base || null, time_base: stream.time_base || null,
bit_rate: tryGrabBitRate(stream, all_streams, total_bit_rate), bit_rate: tryGrabBitRate(stream, all_streams, total_bit_rate),
language: tryGrabTags(stream, 'language'), language: tryGrabTags(tagData, 'language'),
title: tryGrabTags(stream, 'title'), title: tryGrabTags(tagData, 'title'),
} }
if (stream.tags) info.tags = stream.tags if (stream.tags) info.tags = stream.tags