diff options
author | Johns <johns98@gmx.net> | 2011-12-13 18:06:25 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2011-12-13 18:06:25 +0100 |
commit | a38cf3d9ae6d33a41094790b2d21aab099c299c9 (patch) | |
tree | e7a428831681996feb0e34e51893afe58d46484f | |
parent | 61cbb31d3dcbc4f8ce2af822083ff7d6e1e1ab9c (diff) | |
download | vdr-plugin-softhddevice-a38cf3d9ae6d33a41094790b2d21aab099c299c9.tar.gz vdr-plugin-softhddevice-a38cf3d9ae6d33a41094790b2d21aab099c299c9.tar.bz2 |
Add vaSyncSurface for new surface displayed.
Intel 1080i needs sync to have frame decoded.
Nvidia drops frames, if always synced.
-rw-r--r-- | Todo | 2 | ||||
-rw-r--r-- | video.c | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -1,6 +1,7 @@ libva-intel-driver: intel still has hangups most with 1080i + 1080i does no v-sync (workaround written) osd has sometimes wrong size (workaround written) libva-vdpau-driver: @@ -16,6 +17,7 @@ x11: audio/alsa: video/audio asyncron + random crash in av_parser_parse2, when switching channels playback of >2 channels on 2 channel hardware done? @@ -2444,6 +2444,7 @@ static void VaapiDisplayFrame(void) // look if any stream have a new surface available for (i = 0; i < VaapiDecoderN; ++i) { int filled; + int next_surface; decoder = VaapiDecoders[i]; filled = atomic_read(&decoder->SurfacesFilled); @@ -2457,6 +2458,7 @@ static void VaapiDisplayFrame(void) // 0 -> 1 // 1 -> 0 + advance + next_surface = 0; if (decoder->Interlaced) { // FIXME: first frame is never shown if (decoder->SurfaceField) { @@ -2465,6 +2467,7 @@ static void VaapiDisplayFrame(void) % VIDEO_SURFACES_MAX; atomic_dec(&decoder->SurfacesFilled); decoder->SurfaceField = 0; + next_surface = 1; } } else { decoder->SurfaceField = 1; @@ -2483,7 +2486,7 @@ static void VaapiDisplayFrame(void) start = GetMsTicks(); // wait for rendering finished - if (0 && vaSyncSurface(decoder->VaDisplay, surface) + if (next_surface && vaSyncSurface(decoder->VaDisplay, surface) != VA_STATUS_SUCCESS) { Error(_("video/vaapi: vaSyncSurface failed\n")); } @@ -3465,6 +3468,7 @@ void VideoRenderFrame(VideoHwDecoder * decoder, AVCodecContext * video_ctx, VideoPollEvent(); + // FIXME: with interlace it could happen that this is not displayed if (!(decoder->Vaapi.FrameCounter % (50 * 10))) { int64_t audio_clock; |