[libav-bugs] [Bug 300] New: Commit 32d545e0 breaks binary backward compatibility

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Sat Jun 2 04:24:18 CEST 2012


           Summary: Commit 32d545e0 breaks binary backward compatibility
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: Normal
         Component: libavformat
        AssignedTo: bugzilla at libav.org
        ReportedBy: jyavenard at gmail.com

commit [32d545e0] inserted a new member to the structure URLProtocol that
breaks binary compatibility.

New members should only ever be added at the end, not in the middle of things !

Using C99 designated initialisers isn't always possible.
(like when using libavformat from a C++ code)

Definition of URLProtocol should be as follow:

---- BEGIN
typedef struct URLProtocol {
    const char *name;
    int     (*url_open)( URLContext *h, const char *url, int flags);
     * This callback is to be used by protocols which open further nested
     * protocols. options are then to be passed to ffurl_open()/ffurl_connect()
     * for those nested protocols.
    int     (*url_open2)(URLContext *h, const char *url, int flags,
AVDictionary **options);

     * Read data from the protocol.
     * If data is immediately available (even less than size), EOF is
     * reached or an error occurs (including EINTR), return immediately.
     * Otherwise:
     * In non-blocking mode, return AVERROR(EAGAIN) immediately.
     * In blocking mode, wait for data/EOF/error with a short timeout (0.1s),
     * and return AVERROR(EAGAIN) on timeout.
     * Checking interrupt_callback, looping on EINTR and EAGAIN and until
     * enough data has been read is left to the calling function; see
     * retry_transfer_wrapper in avio.c.
    int     (*url_read)( URLContext *h, unsigned char *buf, int size);
    int     (*url_write)(URLContext *h, const unsigned char *buf, int size);
    int64_t (*url_seek)( URLContext *h, int64_t pos, int whence);
    int     (*url_close)(URLContext *h);
    struct URLProtocol *next;
    int (*url_read_pause)(URLContext *h, int pause);
    int64_t (*url_read_seek)(URLContext *h, int stream_index,
                             int64_t timestamp, int flags);
    int (*url_get_file_handle)(URLContext *h);
    int priv_data_size;
    const AVClass *priv_data_class;
    int flags;
    int (*url_check)(URLContext *h, int mask);
    int (*url_shutdown)(URLContext *h, int flags);
} URLProtocol;
---- END

note that url_shutdown member is add at the bottom instead

Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list