ffmpeg: fix issue where valid streams are overridden by invalid ones

This commit is contained in:
calzoneman 2015-09-03 18:11:25 -07:00
parent bb3b9004e0
commit 00fd0482a5
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ function reformatData(data) {
var container = data.format.format_name.split(",")[0];
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;
if (!reformatted.title && stream.tags) {
reformatted.title = stream.tags.title;