[Ffmpeg-devel] some quick questions about swscaler integration

Måns Rullgård mru
Sun Mar 19 13:19:45 CET 2006

Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:

> Hi,
> On Sun, Mar 19, 2006 at 03:52:17AM +0000, M?ns Rullg?rd wrote:
>> >    Maybe those hopelessly misguided morons have been badly bitten at
>> >    some point by the dreaded circular dependency problem where header
>> >    "a" required header "b" and header "b" required header "a" and they
>> a.h:
>> #ifndef A_H
>> #define A_H
>> #include <b.h>
>> #endif
>> b.h:
>> #ifndef B_H
>> #define B_H
>> #include <a.h>
>> #endif
> Huh? call me stupid, but this only avoids an endless loop, but in (some)
> case might still not compile, right? Of course, that problem would still
> exist whether you have the #includes in the headers or somewhere else,
> so I guess it's hardly relevant...

... but was what the whole thing was about.  Changing topic to an
unrelated problem isn't fair debating.

Now that you mention it, maybe the Colin was talking about a situation
like this:

struct a {
    struct b *b;

struct b {
    struct a *a;

In this case, those files are interdependent enough that they should
probably be merged.  Alternatively, both structs can be declared in a
separate header that both a.h and b.h #include.

If you start getting more complicated circular dependencies, it is
time to rethink your design.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list