summaryrefslogtreecommitdiff
path: root/video.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-03-30 16:04:25 +0200
committerJohns <johns98@gmx.net>2012-03-30 16:04:25 +0200
commit6058f3da5649888fc489a516659b8b346fd24c80 (patch)
tree04233ac32747d649c7aef92046a8dc94d3184ddd /video.c
parent689d75b808705b423955a6d5e938d8c6a322e847 (diff)
downloadvdr-plugin-softhddevice-6058f3da5649888fc489a516659b8b346fd24c80.tar.gz
vdr-plugin-softhddevice-6058f3da5649888fc489a516659b8b346fd24c80.tar.bz2
Fix bug: VideoSetPts wrong position.
Diffstat (limited to 'video.c')
-rw-r--r--video.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/video.c b/video.c
index c31b5c3..9556147 100644
--- a/video.c
+++ b/video.c
@@ -4418,8 +4418,6 @@ static void VaapiSyncDisplayFrame(VaapiDecoder * decoder)
static void VaapiSyncRenderFrame(VaapiDecoder * decoder,
const AVCodecContext * video_ctx, const AVFrame * frame)
{
- VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
-
#ifdef DEBUG
if (!atomic_read(&decoder->SurfacesFilled)) {
Debug(3, "video: new stream frame %d\n", GetMsTicks() - VideoSwitch);
@@ -4435,6 +4433,7 @@ static void VaapiSyncRenderFrame(VaapiDecoder * decoder,
VaapiPrintFrames(decoder);
}
decoder->DropNextFrame--;
+ VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
return;
}
// if video output buffer is full, wait and display surface.
@@ -4468,6 +4467,7 @@ static void VaapiSyncRenderFrame(VaapiDecoder * decoder,
VaapiSyncDisplayFrame(decoder);
}
+ VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
VaapiRenderFrame(decoder, video_ctx, frame);
#ifdef USE_AUTOCROP
VaapiCheckAutoCrop(decoder);
@@ -7516,9 +7516,6 @@ static void VdpauSyncRenderFrame(VdpauDecoder * decoder,
Debug(3, "video: render frame pts %s\n",
Timestamp2String(frame->pkt_pts));
}
-
- VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
-
#ifdef DEBUG
if (!atomic_read(&decoder->SurfacesFilled)) {
Debug(3, "video: new stream frame %d\n", GetMsTicks() - VideoSwitch);
@@ -7534,9 +7531,11 @@ static void VdpauSyncRenderFrame(VdpauDecoder * decoder,
VdpauPrintFrames(decoder);
}
decoder->DropNextFrame--;
+ VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
return;
}
if (VdpauPreemption) { // display preempted
+ VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
return;
}
// if video output buffer is full, wait and display surface.
@@ -7574,6 +7573,7 @@ static void VdpauSyncRenderFrame(VdpauDecoder * decoder,
VdpauSyncDisplayFrame(decoder);
}
+ VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
VdpauRenderFrame(decoder, video_ctx, frame);
}