diff --git a/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp b/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
index a550532..d0e88d4 100644
a
|
b
|
bool NuppelVideoPlayer::IsNearEnd(long long margin) const
|
4739 | 4739 | player_ctx->UnlockPlayingInfo(__FILE__, __LINE__); |
4740 | 4740 | |
4741 | 4741 | margin = (margin >= 0) ? margin: (long long) (video_frame_rate*2); |
| 4742 | margin += GetDecoder()->GetBufferedFrameCount(); |
4742 | 4743 | margin = (long long) (margin * audio_stretchfactor); |
4743 | 4744 | bool watchingTV = watchingrecording && player_ctx->recorder && |
4744 | 4745 | player_ctx->recorder->IsValidRecorder(); |
diff --git a/mythtv/libs/libmythtv/avformatdecoder.h b/mythtv/libs/libmythtv/avformatdecoder.h
index 0fe60aa..5374e6b 100644
a
|
b
|
class AvFormatDecoder : public DecoderBase
|
123 | 123 | MythCodecID GetVideoCodecID(void) const { return video_codec_id; } |
124 | 124 | void *GetVideoCodecPrivate(void); |
125 | 125 | |
| 126 | uint GetBufferedFrameCount(void) const { return storedPackets.count(); } |
| 127 | |
126 | 128 | virtual void SetDisablePassThrough(bool disable); |
127 | 129 | void AddTextData(unsigned char *buf, int len, long long timecode, char type); |
128 | 130 | |
diff --git a/mythtv/libs/libmythtv/decoderbase.h b/mythtv/libs/libmythtv/decoderbase.h
index 5969a2b..8a23386 100644
a
|
b
|
class DecoderBase
|
103 | 103 | virtual MythCodecID GetVideoCodecID(void) const = 0; |
104 | 104 | virtual void *GetVideoCodecPrivate(void) { return NULL; } |
105 | 105 | |
| 106 | virtual uint GetBufferedFrameCount(void) const { return 0; } |
| 107 | |
106 | 108 | virtual bool SyncPositionMap(void); |
107 | 109 | virtual bool PosMapFromDb(void); |
108 | 110 | virtual bool PosMapFromEnc(void); |