ffmpeg: fix issue where valid streams are overridden by invalid ones
This commit is contained in:
parent
bb3b9004e0
commit
00fd0482a5
|
|
@ -128,7 +128,8 @@ function reformatData(data) {
|
||||||
var container = data.format.format_name.split(",")[0];
|
var container = data.format.format_name.split(",")[0];
|
||||||
|
|
||||||
data.streams.forEach(function (stream) {
|
data.streams.forEach(function (stream) {
|
||||||
if (stream.codec_type === "video") {
|
if (stream.codec_type === "video" &&
|
||||||
|
acceptedCodecs.hasOwnProperty(container + "/" + stream.codec_name)) {
|
||||||
reformatted.vcodec = stream.codec_name;
|
reformatted.vcodec = stream.codec_name;
|
||||||
if (!reformatted.title && stream.tags) {
|
if (!reformatted.title && stream.tags) {
|
||||||
reformatted.title = stream.tags.title;
|
reformatted.title = stream.tags.title;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue