Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/grasdk/pigallery2 into bu…
Browse files Browse the repository at this point in the history
…gfix/892
  • Loading branch information
grasdk committed Jun 28, 2024
2 parents 671065c + 39f1484 commit add1914
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,13 @@ jobs:
strategy:
matrix:
node-version: [18.x]

services:
mariadb:
image: mariadb:lts
ports:
- 3306
env:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: pigallery_test
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3


steps:
- uses: getong/mariadb-action@v1.11
with:
mysql database: 'pigallery_test'
mysql root password: 'password'
mysql user: 'user'
mysql password: 'password'
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
6 changes: 3 additions & 3 deletions src/backend/model/fileaccess/PhotoWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ export class VideoRendererFactory {
let width = null;
let height = null;
for (const stream of data.streams) {
if (stream.width) {
if (stream.width && stream.height && !isNaN(stream.width) && !isNaN(stream.height)) {
width = stream.width;
height = stream.height;
break;
}
}
if (!width || !height) {
return reject('[FFmpeg] Can not read video dimension');
if (!width || !height || isNaN(width) || isNaN(height)) {
return reject(`[FFmpeg] Can not read video dimension. Found: ${{width}}x${{height}}`);
}
const command: FfmpegCommand = ffmpeg(input.mediaPath);
const fileName = path.basename(input.outPath);
Expand Down

0 comments on commit add1914

Please sign in to comment.