static VdpDecoderDestroy *vdp_decoder_destroy;
static VdpDecoderRender *vdp_decoder_render;
+// TODO: Shouldn't these be protected by a mutex?
static int vdpau_init_done = 0;
+static int vdpau_supported = 1;
/** VDPAUD functions
*/
static int vdpau_init( producer_avformat self )
{
+ if ( !vdpau_supported )
+ return 0;
mlt_log_debug( MLT_PRODUCER_SERVICE(self->parent), "vdpau_init\n" );
int success = 0;
mlt_properties properties = MLT_PRODUCER_PROPERTIES( self->parent );
if ( !vdpau_init_done )
{
int flags = RTLD_NOW;
- object = dlopen( "/usr/lib64/libvdpau.so", flags );
+ object = dlopen( "/usr/lib/libvdpau.so", flags );
+#ifdef ARCH_X86_64
if ( !object )
- object = dlopen( "/usr/lib/libvdpau.so", flags );
+ object = dlopen( "/usr/lib64/libvdpau.so", flags );
+ if ( !object )
+ object = dlopen( "/usr/lib/x86_64-linux-gnu/libvdpau.so.1", flags );
+#elif ARCH_X86
+ if ( !object )
+ object = dlopen( "/usr/lib/i386-linux-gnu/libvdpau.so.1", flags );
+#endif
if ( !object )
object = dlopen( "/usr/local/lib/libvdpau.so", flags );
if ( object )
else
{
mlt_log( MLT_PRODUCER_SERVICE(self->parent), MLT_LOG_WARNING, "%s: failed to dlopen libvdpau.so\n (%s)\n", __FUNCTION__, dlerror() );
+ // Don't try again.
+ vdpau_supported = 0;
return success;
}
}
if ( object )
dlclose( object );
if ( self->vdpau )
- vdpau_fini( self );
+ free( self->vdpau );
+ self->vdpau = NULL;
}
return success;
frame->reordered_opaque = codec_context->reordered_opaque;
if ( frame->reference )
{
- frame->age = self->vdpau->ip_age[0];
self->vdpau->ip_age[0] = self->vdpau->ip_age[1] + 1;
self->vdpau->ip_age[1] = 1;
self->vdpau->b_age++;
}
else
{
- frame->age = self->vdpau->b_age;
self->vdpau->ip_age[0] ++;
self->vdpau->ip_age[1] ++;
self->vdpau->b_age = 1;