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

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;