-
Notifications
You must be signed in to change notification settings - Fork 42
changes to build against latest ffmpeg library #143
Conversation
I don't think those AVMEDIA_ things are defined in older ffmpegs, like the one that is distributed along with xbmc? If that's the case (not sure, haven't looked into the code), this PR will break the standard compilation process (which is using internal-ffmpeg). |
It shouldn't break anything. The AVMEDIA_ things are defined in lib/DllAvCodec.h if ffmpeg's version is too old. See lib/DllAvCodec.h around line 90. |
Concerning "#define MAX_STREAMS 100", to be perfectly safe, I can make a check like below if you want : #ifndef MAX_STREAMS |
I'd rather see the need removed than spend more time on it. Just make it a array that get's realloced on each added stream to match ffmpeg number of streams. |
Ok, like this : Is that right ? |
nope.. one option could be:
then just make sure the array can hold as many as the largest index. the alternative:
then:
before you add new streams. |
Ok, well it's beyond my little C++ experience, could you tell me exactly what to change and then I'll commit it ? would replacing this: #define MAX_STREAMS 100 CDemuxStream* m_streams[MAX_STREAMS]; // maximum number of streams that ffmpeg can handle by this as you mentionned (I corrected m_stream to m_streams) : CDemuxStream** m_streams; m_streams = (CDemuxStream**)realloc(m_streams, new_count * sizeof(CDemuxStream*) ); do the trick? is the syntax correct? |
@elepus : perhaps Lars can merge my changes as-is for now, as it works, and we'll think of a better way to declare m_streams later. Moreover, it would match how it is done right now in #define MAX_STREAMS 100 CDemuxStream* m_streams[MAX_STREAMS]; // maximum number of streams that ffmpeg can handle |
I could do that for now, but put the #define MAX_STREAMS between #ifndef first, cause it's already defined here. I can refactor it to get that MAX_STREAMS things out. |
Ok, done ;) |
pvr: changes to build against latest ffmpeg library
I'll factor the MAX_STREAMS out when I got time. |
Changes only related to XBMC-PVR to be able to build with the latests revisions of ffmpeg external library.