Opened 13 years ago

Closed 2 years ago

#34094 closed enhancement (invalid)

ffmpeg: patch required to solve undefined type/function when using C++

Reported by: liampg72@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager), chrstphrchvz (Christopher Chavez)
Port: ffmpeg

Description

Hi there,

I beleive this is a common problem when using ffmpeg in a C++ program. This link provides the detail of what needs to be patched to fix the problem.

To be clear, this is the error output I get from my program when I include "libavutil/common.h"

/opt/local/include/libavutil/common.h: In function 'int32_t av_clipl_int32_c(int64_t)':
/opt/local/include/libavutil/common.h:170:47: error: 'UINT64_C' was not declared in this scope

Hope this can be solved simply. Sorry that I can't submit the patch myself, I'm not to confident with Portfiles...

Attachments (1)

libavutil-common.h.diff (470 bytes) - added by liampg72@… 13 years ago.
Possible patch of libavutil/common.h

Download all attachments as: .zip

Change History (11)

Changed 13 years ago by liampg72@…

Attachment: libavutil-common.h.diff added

Possible patch of libavutil/common.h

comment:1 in reply to:  description Changed 13 years ago by liampg72@…

After further searching, maybe this isn't the way to fix this. Apologies. I still can't get my program to work, however...

comment:2 Changed 12 years ago by jmroot (Joshua Root)

Cc: jeremyhu@… added; devans@… removed
Owner: changed from macports-tickets@… to devans@…

comment:3 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 Changed 5 years ago by jmroot (Joshua Root)

Is this still a problem with the current version?

comment:5 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

The error likely no longer occurs as reported; a check that has since been added would show a different error message. See https://github.com/FFmpeg/FFmpeg/commit/66872161cb

comment:6 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:7 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

The upstream change I linked to is effectively the result of upstream's rejection of the patch the reporter attached here; they believe user C++ code is responsible for defining __STDC_CONSTANT_MACROS. See wiki page "Including FFmpeg headers in a C++ application" and lengthy mailing list discussion regarding the patch.

comment:8 Changed 3 years ago by mascguy (Christopher Nielsen)

Can we close this?

comment:9 Changed 3 years ago by mascguy (Christopher Nielsen)

Owner: changed from dbevans to jeremyhu
Status: newassigned

Reassign ffmpeg-related tickets to Jeremy

comment:10 in reply to:  7 Changed 2 years ago by mascguy (Christopher Nielsen)

Resolution: invalid
Status: assignedclosed

Replying to chrstphrchvz:

The upstream change I linked to is effectively the result of upstream's rejection of the patch the reporter attached here; they believe user C++ code is responsible for defining __STDC_CONSTANT_MACROS. See wiki page "Including FFmpeg headers in a C++ application" and lengthy mailing list discussion regarding the patch.

Closing issue, as upstream drives the API.

Note: See TracTickets for help on using tickets.