Bug 853325 - Improve buffered time ranges accuracy with the GStreamer media backend r=doublec

This commit is contained in:
Alessandro Decina 2013-04-11 20:46:47 +12:00
parent 5fe6a21e21
commit 435a7a47c4

View File

@ -711,12 +711,15 @@ int64_t GStreamerReader::QueryDuration()
} }
} }
/*if (mDecoder->mDuration != -1 && {
mDecoder->mDuration > duration) { ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
// We decoded more than the reported duration (which could be estimated) int64_t media_duration = mDecoder->GetMediaDuration();
LOG(PR_LOG_DEBUG, ("mDuration > duration")); if (media_duration != -1 && media_duration > duration) {
duration = mDecoder->mDuration; // We decoded more than the reported duration (which could be estimated)
}*/ LOG(PR_LOG_DEBUG, ("decoded duration > estimated duration"));
duration = media_duration;
}
}
return duration; return duration;
} }