Last active
October 2, 2016 16:52
-
-
Save fcicq/6b3f15fc4b0e97db4919b79b9add3250 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/rtmpdump.c b/rtmpdump.c | |
index 13741a7..56dce8e 100644 | |
--- a/rtmpdump.c | |
+++ b/rtmpdump.c | |
@@ -527,6 +531,11 @@ Download(RTMP * rtmp, // connected RTMP object | |
} | |
size += nRead; | |
+ if (dStopOffset && rtmp->m_read.timestamp >= (dStopOffset - dSeek)) | |
+ { | |
+ break; | |
+ } | |
+ | |
//RTMP_LogPrintf("write %dbytes (%.1f kB)\n", nRead, nRead/1024.0); | |
if (duration <= 0) // if duration unknown try to get it from the stream (onMetaData) | |
duration = RTMP_GetDuration(rtmp); | |
@@ -622,6 +630,9 @@ Download(RTMP * rtmp, // connected RTMP object | |
return RD_FAILED; | |
} | |
+ if (dStopOffset && rtmp->m_read.timestamp >= (dStopOffset - dSeek)) | |
+ return RD_SUCCESS; | |
+ | |
if (nRead == -3) | |
return RD_SUCCESS; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment