Skip to content

Commit

Permalink
[coreImageLoader] Let odd dimensions be in case of JPEG images as well
Browse files Browse the repository at this point in the history
Else we disagree with libavcodec and crash when duplicating decoded image.
  • Loading branch information
eumagga0x2a committed Jun 13, 2023
1 parent 89c962a commit a6b2c67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions avidemux_core/ADM_coreImageLoader/src/ADM_imageLoader.cpp
Expand Up @@ -222,8 +222,10 @@ static bool readJpegInfo(FILE *fd, int &width, int &height)
reader.read8(); // precision
h = reader.read16BE();
w = reader.read16BE();
#ifdef FAKE_EVEN_DIMENSIONS
if(w&1) w++;
if(h&1) h++;
#endif
ADM_info("Dimension %d x %d\n",(int)w,(int)h);
width=w;
height=h;
Expand Down

0 comments on commit a6b2c67

Please sign in to comment.