[Libva] vdpau-video aborts in case of errors

Varun Dua varundua007 at gmail.com
Tue Dec 7 05:24:39 PST 2010


Hi All,

In my project I am developing an application which decodes h.264 video using
hardware if it finds libva and a compatible hardware, and it fallbacks to
software mode (the normal ffmpeg mode) in case the library is not found or
hardware doesn't support H.264 profile. But I am having some unusual error
on my opensuse machine with Nvidia Graphics Card Quadro FX 4600.

libva: libva version 0.31.1-sds1
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/local/lib/va/drivers/nvidia_drv_video.so
vainfo: vdpau_driver.c:235: vdpau_do_Initialize: Assertion `vdp_status ==
VDP_STATUS_OK' failed.

I searched the internet and found out that my Graphics card doesn't support
vdpau. But why is libva not returning any error code in vaInitialize and why
it is forcing the application to abort ? I looked into the files and then
found out that in sysdeps.h ASSERT is defined to abort even if it debugging
is disabled in the library.

#if USE_DEBUG
# define ASSERT assert
#else
# define ASSERT(expr) do {                                              \
        if (!(expr)) {                                                  \
            vdpau_error_message("Assertion failed in file %s at line %d\n",
\
                                __FILE__, __LINE__);                    \
            abort();                                                    \
        }                                                               \
} while (0)
#endif

Isn't it should be defined like this


#if USE_DEBUG
# define ASSERT assert
#else
# define ASSERT(expr)                                               \
        if (!(expr)) {                                                  \
            vdpau_error_message("Assertion failed in file %s at line %d\n",
\
                                __FILE__, __LINE__);                    \
        }                                                               \
#endif

I am a newbie, have never written any open source code. Please tell me what
is the problem if it is defined like that? and if there is no problem then
isn't the abort mechanism should be removed from the vdpau-video with
debugging disabled

Regards
Varun Dua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libva/attachments/20101207/167c7e33/attachment.html>


More information about the Libva mailing list