ilia3101 / MLV-App

All in one MLV processing app.
https://mlv.app/
GNU General Public License v3.0
283 stars 29 forks source link

QtApp on windows does not open MLV files #4

Closed masc4ii closed 7 years ago

masc4ii commented 7 years ago

I tried to compile the v0.7 alpha on Windows with MinGW 32bit. Application opens normal. But when trying to open a MLV with audio, the App crashes. It does not crash, if there is no audio in the MLV.

Switching off STDOUT_SILENT, the last output is depending on the file: Block #... or AUDF/audio block...

This does not happen on OSX.

masc4ii commented 7 years ago

Did some more tests... now I also found files without audio crashing the App on Windows. @bouncyball-git : if you compile this revision (or newest revision), does it have the same behaviour? Or is just my new installed Qt buggy?

masc4ii commented 7 years ago

Tried with different PC to build the app for Win32. Opening (nearly any) MLV file crashes the app, not only files with audio.

masc4ii commented 7 years ago

First revision with this error is this one.

masc4ii commented 7 years ago

The error comes with this change: video_mlv.c before:

{
    // double camera_matrix[9];
    // double xyz_to_rgb_matrix[9];

    /* Easy bit */
    video->processing = processing;

    /* MATRIX stuff (not working, so commented out - 
     * processing object defaults to 1,0,0,0,1,0,0,0,1) */

    /* Get camera matrix for MLV clip and set it in the processing object */
    // getMlvXyzToCameraMatrix(video, camera_matrix);
    /* Set Camera to XYZ */
    // processingSetXyzToCamMatrix(processing, camera_matrix);

    /* Get and set some XYZ to RGB matrix(a funky one) */
    // getMlvNiceXyzToRgbMatrix(video, xyz_to_rgb_matrix);
    // processingSetXyzToRgbMatrix(processing, xyz_to_rgb_matrix);

    /* BLACK / WHITE level */
    processingSetBlackAndWhiteLevel( processing, 
                                     getMlvBlackLevel(video) * 4,
                                     getMlvWhiteLevel(video) * 4 );

    /* DONE? */
}

after:

{
    double camera_matrix[9];

    /* Easy bit */
    video->processing = processing;

    /* MATRIX stuff (not working, so commented out - 
     * processing object defaults to 1,0,0,0,1,0,0,0,1) */

    /* Get camera matrix for MLV clip and set it in the processing object */
    getMlvCameraTosRGBMatrix(video, camera_matrix);
    /* Set Camera to RGB */
    processingCamTosRGBMatrix(processing, camera_matrix); /* Still not used in processing cos not working right */

    /* BLACK / WHITE level */
    processingSetBlackAndWhiteLevel( processing, 
                                     getMlvBlackLevel(video) * 4,
                                     getMlvWhiteLevel(video) * 4 );

    /* DONE? */
}
masc4ii commented 7 years ago

Okay... I think I have it! Crash at camera_matrices.c line 158 on Windows. Commenting in original_matrix = matrix_5d2; fixes the problem for me. @ilia3101 : Could you please check?

ilia3101 commented 7 years ago

ah right, my (still pointless) matrix stuff causing problems again :( You can coment out these lines completely for now, as it is not used at all if i recall correctly

getMlvCameraTosRGBMatrix(video, camera_matrix);
processingCamTosRGBMatrix(processing, camera_matrix);
masc4ii commented 7 years ago

Both functions? Okay, I'll do. :-) Edit: okay, no crash on Windows anymore.

masc4ii commented 7 years ago

Bug fixed with this commit.