aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libMpegTPDec/src/tpdec_lib.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libMpegTPDec/src/tpdec_lib.cpp b/libMpegTPDec/src/tpdec_lib.cpp
index 09f0703..5760752 100644
--- a/libMpegTPDec/src/tpdec_lib.cpp
+++ b/libMpegTPDec/src/tpdec_lib.cpp
@@ -342,7 +342,9 @@ TRANSPORTDEC_ERROR transportDec_FillData(
}
} else {
/* ... else feed bitbuffer with new stream data (append). */
- FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid);
+ if ((hTp->numberOfRawDataBlocks <= 0) || (FDKgetValidBits(hBs)==0)) {
+ FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid) ;
+ }
}
return TRANSPORTDEC_OK;