Commit 2a415ad
committed
Fix crash when the pixel format is unknown in frames (#794)
### Fix crash when the pixel format is unknown in frames
### Linked issues
n/a
### Summarize your change.
Save the pixel format when the media is opened and use that as fallback
if the pixel format of some frames can not be detected. This assumes
that there is a pixel format when opening the file and if it does not
have one, it will fail at that point before getting to
`decodeImageAtFrame`.
### Describe the reason for the change.
OpenRV was crashing on some AV1 media because the pixel format was
unknown for all the frames.
### Describe what you have tested and on which operating system.
MacOS
### Add a list of changes, and note any that might need special
attention during the review.
### If possible, provide screenshots.
Signed-off-by: Cédrik Fuoco <[email protected]>1 parent d0470e1 commit 2a415ad
File tree
3 files changed
+27
-2
lines changed- src/lib/image/MovieFFMpeg
- MovieFFMpeg
3 files changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1480 | 1480 | | |
1481 | 1481 | | |
1482 | 1482 | | |
| 1483 | + | |
1483 | 1484 | | |
1484 | 1485 | | |
1485 | 1486 | | |
| |||
3912 | 3913 | | |
3913 | 3914 | | |
3914 | 3915 | | |
| 3916 | + | |
| 3917 | + | |
| 3918 | + | |
| 3919 | + | |
| 3920 | + | |
| 3921 | + | |
| 3922 | + | |
| 3923 | + | |
| 3924 | + | |
| 3925 | + | |
| 3926 | + | |
| 3927 | + | |
| 3928 | + | |
| 3929 | + | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
3915 | 3936 | | |
3916 | 3937 | | |
3917 | 3938 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
| 291 | + | |
287 | 292 | | |
288 | 293 | | |
289 | 294 | | |
| |||
0 commit comments