diff --git a/audio.c b/audio.c index 735fda0..53f8dea 100644 --- a/audio.c +++ b/audio.c @@ -942,9 +942,7 @@ static snd_pcm_t *AlsaOpenPCM(int passthrough) { // // for AC3 pass-through try to set the non-audio bit, use AES0=6 // - if (passthrough) { //) && AudioAppendAES) { - -#if 1 + if (passthrough && AudioAppendAES) { if (!(strchr(device, ':'))) { sprintf(tmp, //"AES0=%d,AES1=%d,AES2=0,AES3=%d", @@ -964,13 +962,11 @@ static snd_pcm_t *AlsaOpenPCM(int passthrough) { //map_iec958_srate(ao->samplerate)); } - //printf( "opening device '%s' => '%s'\n", device, tmp); + printf( "opening device '%s' => '%s'\n", device, tmp); if ((err = snd_pcm_open(&handle, tmp, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0 ) { Error(_("audio/alsa: playback open '%s' error: %s\n"), device, snd_strerror(err)); return NULL; } -; -#endif } else { // open none blocking; if device is already used, we don't want wait if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0) { diff --git a/video.c b/video.c index 0b972a4..6451b76 100644 --- a/video.c +++ b/video.c @@ -2375,11 +2375,9 @@ void generateVAAPIImage(CuvidDecoder *decoder, int index, const AVFrame *frame, return; } // vaSyncSurface(decoder->VaDisplay, (unsigned int)frame->data[3]); -#if defined USE_DRM && defined PLACEBO_GL - SharedContext; -#else + Lock_and_SharedContext; -#endif + for (n = 0; n < 2; n++) { // Set DMA_BUF from VAAPI decoder to Textures int id = desc.layers[n].object_index[0]; int fd = desc.objects[id].fd; @@ -2452,11 +2450,9 @@ void generateVAAPIImage(CuvidDecoder *decoder, int index, const AVFrame *frame, decoder->pl_frames[index].planes[n].texture = pl_tex_create(p->gpu, &tex_params); } -#if defined USE_DRM && defined PLACEBO_GL - NoContext; -#else + Unlock_and_NoContext; -#endif + } #endif @@ -4519,10 +4515,11 @@ static void CuvidDisplayFrame(void) { #if defined PLACEBO // && !defined PLACEBO_GL // first_time = GetusTicks(); if (!pl_swapchain_submit_frame(p->swapchain)) - Fatal(_("Failed to submit swapchain buffer\n")); + Fatal(_("Failed to submit swapchain buffer\n")); + VideoThreadUnlock(); pl_swapchain_swap_buffers(p->swapchain); // swap buffers NoContext; - VideoThreadUnlock(); + #else // not PLACEBO #ifdef CUVID glXGetVideoSyncSGI(&Count); // get current frame