Opened 5 months ago

Closed 5 months ago

#6728 closed defect (fixed)

Inline variable declarations break builds when using non-C99 compliant compiler

Reported by: mark.mccormack Owned by:
Priority: minor Component: avcodec
Version: git-master Keywords: msvc regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Apologies if this is not the correct place to report this, it is compile related not run-time related. I am reporting it because it does appear to be an anomaly in the latest code base.

I have previously been building ffmpeg with the VS2012 compiler OK using the instructions detailed at:

However, a recent change to libavcodec/proresdec2.c contains inline variable declarations which breaks a C89-style compiler using a C89-C99 convertor.

The code in question is contained in lines 599-606.

I appreciate pandering to older compilers could be a burden on development, so if this is intentional then I completely understand. However, with this code removed the rest of the code-base builds OK.

Attachments (1)

patchprores2.diff (703 bytes) - added by cehoyos 5 months ago.

Download all attachments as: .zip

Change History (5)

Changed 5 months ago by cehoyos

comment:1 Changed 5 months ago by cehoyos

  • Keywords msvc regression added; compiler removed
  • Reproduced by developer unset

What does recent mean?

Please test if attached patch fixes the issue for you.

comment:2 Changed 5 months ago by mark.mccormack

"recent". Yes, poor bug reporting on my behalf. It appears that this was the change that introduced the issue.

Thank you for the patch, I will test it ASAP and post the result.

comment:3 Changed 5 months ago by mark.mccormack

The patch provided solves the issue (No other changes were required to the source code to complete the build).

comment:4 Changed 5 months ago by cehoyos

  • Resolution set to fixed
  • Status changed from new to closed

Patch applied, thank you for the report and the testing.

Note: See TracTickets for help on using tickets.