Improved handling frame numbers to have a smoother progress display during replay of recordings with B-frames

This commit is contained in:
Klaus Schmidinger
2016-12-22 11:33:12 +01:00
parent fd85701a84
commit be4cdcf170
9 changed files with 120 additions and 44 deletions

View File

@@ -7,7 +7,7 @@
* Parts of this file were inspired by the 'ringbuffy.c' from the
* LinuxDVB driver (see linuxtv.org).
*
* $Id: ringbuffer.c 2.5 2012/09/22 11:26:49 kls Exp $
* $Id: ringbuffer.c 4.1 2016/12/22 10:26:13 kls Exp $
*/
#include "ringbuffer.h"
@@ -390,12 +390,13 @@ void cRingBufferLinear::Del(int Count)
// --- cFrame ----------------------------------------------------------------
cFrame::cFrame(const uchar *Data, int Count, eFrameType Type, int Index, uint32_t Pts)
cFrame::cFrame(const uchar *Data, int Count, eFrameType Type, int Index, uint32_t Pts, bool Independent)
{
count = abs(Count);
type = Type;
index = Index;
pts = Pts;
independent = Type == ftAudio ? true : Independent;
if (Count < 0)
data = (uchar *)Data;
else {