diff options
author | Johns <johns98@gmx.net> | 2015-02-09 11:50:41 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2015-02-09 11:50:41 +0100 |
commit | 2ceeb6db4062ca57eaad5e25f86f68328035233c (patch) | |
tree | bb7b0f72d2f0d6f6bf89b22eba5021540a97e894 | |
parent | 4f4d3044792bb5db441e0c648ad86ae082774abf (diff) | |
download | vdr-plugin-softhddevice-2ceeb6db4062ca57eaad5e25f86f68328035233c.tar.gz vdr-plugin-softhddevice-2ceeb6db4062ca57eaad5e25f86f68328035233c.tar.bz2 |
Fix bug: AVCodecContext.framerate not supported.
Older versions of ffmpeg have no member framerate in AVCodecContext.
-rw-r--r-- | video.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -456,6 +456,10 @@ static void VideoSetPts(int64_t * pts_p, int interlaced, // Get duration for this frame. // FIXME: using framerate as workaround for av_frame_get_pkt_duration // +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,13,100) + // FIXME: need frame rate for older versions + duration = interlaced ? 40 : 20; // 50Hz -> 20ms default +#else if (video_ctx->framerate.num != 0 && video_ctx->framerate.den != 0) { duration = 1000 * video_ctx->framerate.den / video_ctx->framerate.num; } else { @@ -463,6 +467,7 @@ static void VideoSetPts(int64_t * pts_p, int interlaced, } Debug(4, "video: %d/%d %" PRIx64 " -> %d\n", video_ctx->framerate.den, video_ctx->framerate.num, av_frame_get_pkt_duration(frame), duration); +#endif // update video clock if (*pts_p != (int64_t) AV_NOPTS_VALUE) { |