Can no longer make minidlna

Help
gharris999
2011-07-13
2013-05-29
  • gharris999
    gharris999
    2011-07-13

    After my last cvs up of several days ago, I can no longer make minidlna.  I'm getting the following errors:

    metadata.c: In function GetVideoMetadata:
    metadata.c:676: error: AVMEDIA_TYPE_AUDIO undeclared (first use in this function)
    metadata.c:676: error: (Each undeclared identifier is reported only once
    metadata.c:676: error: for each function it appears in.)
    metadata.c:683: error: AVMEDIA_TYPE_VIDEO undeclared (first use in this function)
    

    Where is AVMEDIA_TYPE_AUDIO supposed to be defined?

     
  • gharris999
    gharris999
    2011-07-13

    Ok, I'm going to guess that this problem compiling metadata.c has to do with Ubuntu's version of libavformat-dev.  Anyway, adding the following to minidlna's metadata.h provides a work-around for this problem:

    enum AVMediaType {
        AVMEDIA_TYPE_UNKNOWN = -1,
        AVMEDIA_TYPE_VIDEO,
        AVMEDIA_TYPE_AUDIO,
        AVMEDIA_TYPE_DATA,
        AVMEDIA_TYPE_SUBTITLE,
        AVMEDIA_TYPE_ATTACHMENT,
        AVMEDIA_TYPE_NB
    };
    

    That was taken from http://www.ffmpeg.org/doxygen/trunk/avutil_8h-source.html

     
  • Justin Maggard
    Justin Maggard
    2011-07-13

    I see, I didn't realize that CODEC_TYPE_* was an enum.  So compiling was broken with old ffmpeg versions due to the invalid test.  I just checked in a fix for that.  Thanks for reporting.