Project

General

Profile

Bug #2085 » vdr-plugin-softhddevice-revert-4f4d3044-v2.diff

hd_brummy, 02/07/2015 10:31 PM

View differences:

vdr-plugin-softhddevice-4f4d3044792bb5db441e0c648ad86ae082774abf/video.c 2015-02-07 18:14:49.144265154 +0100
///
/// @note frame->interlaced_frame can't be used for interlace detection
///
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,13,100)
static void VideoSetPts(int64_t * pts_p, int interlaced, const AVFrame * frame)
{
int64_t pts;
// update video clock
if (*pts_p != (int64_t) AV_NOPTS_VALUE) {
*pts_p += interlaced ? 40 * 90 : 20 * 90;
#else
static void VideoSetPts(int64_t * pts_p, int interlaced,
const AVCodecContext * video_ctx, const AVFrame * frame)
{
......
}
Debug(4, "video: %d/%d %" PRIx64 " -> %d\n", video_ctx->framerate.den,
video_ctx->framerate.num, av_frame_get_pkt_duration(frame), duration);
// update video clock
if (*pts_p != (int64_t) AV_NOPTS_VALUE) {
*pts_p += duration * 90;
#endif /* LIBAVCODEC 55,34,1 */
//Info("video: %s +pts\n", Timestamp2String(*pts_p));
}
//av_opt_ptr(avcodec_get_frame_class(), frame, "best_effort_timestamp");
......
}
if (!decoder->Closing) {
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,13,100)
VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
#else
VideoSetPts(&decoder->PTS, decoder->Interlaced, video_ctx, frame);
#endif /* LIBAVODEC_VERSION 55,34,1 */
}
VaapiRenderFrame(decoder, video_ctx, frame);
#ifdef USE_AUTOCROP
......
if (VdpauPreemption) { // display preempted
if (!decoder->Closing) {
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,13,100)
VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
#else
VideoSetPts(&decoder->PTS, decoder->Interlaced, video_ctx, frame);
#endif /* LIBAVCODEV_VERSION 55,34,1 */
}
return;
}
......
#endif
if (!decoder->Closing) {
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,13,100)
VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
#else
VideoSetPts(&decoder->PTS, decoder->Interlaced, video_ctx, frame);
#endif /* LIBAVCODEC 55,34,1 */
}
VdpauRenderFrame(decoder, video_ctx, frame);
}
(2-2/3)