Fix bug: VideoSetPts wrong position.

This commit is contained in:
Johns 2012-03-30 16:04:25 +02:00
parent 689d75b808
commit 6058f3da56
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,9 @@
User johns
Date:
Release Version 0.5.0
Fix bug: VideoSetPts wrong position for multi frame packets.
User: CafeDelMar
Date: Mon Mar 26 20:45:54 CEST 2012
@ -6,6 +12,7 @@ Date: Mon Mar 26 20:45:54 CEST 2012
User johns
Date: Fri Mar 23 18:43:20 CET 2012
Audio/Video sync rewrite, trick-speed support moved to video.
Add optional argument (display) to ATTA svdrp commmand.
Wakeup display to show OSD for remote learning mode.
Support switching the primary device with svdrp.

10
video.c
View File

@ -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);
}