OSDN Git Service

Revert "stagefright-plugins: Fix timestamp calculation"
[android-x86/external-stagefright-plugins.git] / extractor / FFmpegExtractor.cpp
index 9ab9938..3e150bb 100644 (file)
@@ -1525,7 +1525,7 @@ retry:
     }
 
     if (pktTS != AV_NOPTS_VALUE)
-        timeUs = av_rescale_q(pktTS, mStream->time_base, AV_TIME_BASE_Q) + startTimeUs;
+        timeUs = av_rescale_q(pktTS, mStream->time_base, AV_TIME_BASE_Q) - startTimeUs;
     else
         timeUs = SF_NOPTS_VALUE; //FIXME AV_NOPTS_VALUE is negative, but stagefright need positive