Opened 7 years ago

Closed 7 years 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

Description

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: https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC.

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.

https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/proresdec2.c#L599

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 Carl Eugen Hoyos 7 years ago.

Download all attachments as: .zip

Change History (5)

by Carl Eugen Hoyos, 7 years ago

Attachment: patchprores2.diff added

comment:1 by Carl Eugen Hoyos, 7 years ago

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 by Mark McCormack, 7 years ago

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

https://github.com/FFmpeg/FFmpeg/commit/9c43703620a8b2b002cc0681f2da5cf869f0fc80

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

comment:3 by Mark McCormack, 7 years ago

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

comment:4 by Carl Eugen Hoyos, 7 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.