When converting to FLV, video_render.php only tests that the FLV file exists after running ffmpeg. However, if ffmpeg happens to segfault, it may have left a zero-byte output file.

This is a simple patch to check that the output file is of non-zero size, in addition to checking that it exists.

Thanks.

Comments

stmind’s picture

StatusFileSize
new471 bytes

WRONG PATCH

I attached the wrong patch. Please use this one.

stmind’s picture

StatusFileSize
new652 bytes

In further testing, I found another bug in video_render.php (line 94). There is a transposed closing paren in the watchdog call.

    watchdog('video_render', t('video conversion failed. ffmpeg reported the following output: ' . $command_output, WATCHDOG_ERROR));
# should be 
    watchdog('video_render', t('video conversion failed. ffmpeg reported the following output: ' . $command_output), WATCHDOG_ERROR);

I'm attaching a revised patch that fixes both issues.

hypertext200’s picture

Status: Needs review » Fixed

ported

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.