Bug #2085 » vdr-softhddevice-LIBAVCODEC.patch
vdr-plugin-softhddevice-9f134c1b6d7e4a488db9933f489ea2a56ec057b7/video.c 2015-02-07 22:48:58.937890685 +0100 | ||
---|---|---|
///
|
||
/// @note frame->interlaced_frame can't be used for interlace detection
|
||
///
|
||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,34,1)
|
||
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)
|
||
{
|
||
int64_t pts;
|
||
// update video clock
|
||
if (*pts_p != (int64_t) AV_NOPTS_VALUE) {
|
||
*pts_p += interlaced ? 40 * 90 : 20 * 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) {
|
||
VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
|
||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,34,1)
|
||
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) {
|
||
VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
|
||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,34,1)
|
||
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) {
|
||
VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
|
||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,34,1)
|
||
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);
|
||
}
|
- « Previous
- 1
- 2
- 3
- Next »