[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10935: Fix bug #26687 by having Net
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10935: Fix bug #26687 by having NetStream PlayHead move onto next audio frame timestamp when output queue is empty and there's no video in the input stream. An automated test for this would be nice, but there's none. |
Date: |
Wed, 27 May 2009 20:01:46 +0200 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 10935
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Wed 2009-05-27 20:01:46 +0200
message:
Fix bug #26687 by having NetStream PlayHead move onto next audio frame
timestamp when output queue is empty and there's no video in the input stream.
An automated test for this would be nice, but there's none.
modified:
libcore/asobj/NetStream_as.cpp
=== modified file 'libcore/asobj/NetStream_as.cpp'
--- a/libcore/asobj/NetStream_as.cpp 2009-04-23 14:46:54 +0000
+++ b/libcore/asobj/NetStream_as.cpp 2009-05-27 18:01:46 +0000
@@ -1325,6 +1325,40 @@
// by all available consumers
_playHead.advanceIfConsumed();
+ // As of bug #26687 we discovered that
+ // an FLV containing only audio with consecutive
+ // frames performing a jump of more then an hour
+ // result in a jump-forward of the playhead (NetStream.time)
+ // w/out waiting for the whole time gap to elapse
+ //
+ // We'll then perform the jump with this conditions:
+ // 1: there are no video frames yet
+ // 2: the audio buffer is empty, to avoid buffer overrun conditions
+ // 3: input audio frames exist with a timestamp in the future
+ //
+ if ( ! m_parser->getVideoInfo() )
+ {
+ // FIXME: use services of BufferedAudioStreamer for this
+ boost::mutex::scoped_lock lock(_audioStreamer._audioQueueMutex);
+ bool emptyAudioQueue = _audioStreamer._audioQueue.empty();
+ lock.unlock();
+
+ if ( emptyAudioQueue )
+ {
+ boost::uint64_t nextTimestamp;
+ if ( m_parser->nextAudioFrameTimestamp(nextTimestamp) )
+ {
+ log_debug("Moving NetStream playhead "
+ "from timestamp %d to timestamp %d "
+ "as there are no video frames yet, "
+ "audio buffer is empty and next audio "
+ "frame timestamp is there (see bug #26687)",
+ _playHead.getPosition(), nextTimestamp);
+ _playHead.seekTo(nextTimestamp);
+ }
+ }
+ }
+
media::MediaParser::OrderedMetaTags tags;
m_parser->fetchMetaTags(tags, _playHead.getPosition());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10935: Fix bug #26687 by having NetStream PlayHead move onto next audio frame timestamp when output queue is empty and there's no video in the input stream. An automated test for this would be nice, but there's none.,
Sandro Santilli <=