Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 470713 Details for
Bug 584615
[patch]
Fix for intermittent infinite loop
infinite_loop.patch (text/plain), 2.32 KB, created by
cajbir (:cajbir)
(
hide
)
Description:
Fix for intermittent infinite loop
Filename:
MIME Type:
Creator:
cajbir (:cajbir)
Size:
2.32 KB
patch
obsolete
>diff --git a/content/media/ogg/nsOggReader.cpp b/content/media/ogg/nsOggReader.cpp >index b2318ec..a3c5aeb 100644 >--- a/content/media/ogg/nsOggReader.cpp >+++ b/content/media/ogg/nsOggReader.cpp >@@ -279,24 +279,20 @@ nsresult nsOggReader::ReadMetadata() > s->Deactivate(); > } > } > > // Initialize the first Theora and Vorbis bitstreams. According to the > // Theora spec these can be considered the 'primary' bitstreams for playback. > // Extract the metadata needed from these streams. > // Set a default callback period for if we have no video data >- if (mTheoraState) { >- if (mTheoraState->Init()) { >- gfxIntSize sz(mTheoraState->mInfo.pic_width, >- mTheoraState->mInfo.pic_height); >- mDecoder->SetVideoData(sz, mTheoraState->mPixelAspectRatio, nsnull); >- } else { >- mTheoraState = nsnull; >- } >+ if (mTheoraState && mTheoraState->Init()) { >+ gfxIntSize sz(mTheoraState->mInfo.pic_width, >+ mTheoraState->mInfo.pic_height); >+ mDecoder->SetVideoData(sz, mTheoraState->mPixelAspectRatio, nsnull); > } > if (mVorbisState) { > mVorbisState->Init(); > } > > if (!HasAudio() && !HasVideo() && mSkeletonState) { > // We have a skeleton track, but no audio or video, may as well disable > // the skeleton, we can't do anything useful with this media. >@@ -1609,16 +1605,26 @@ nsresult nsOggReader::GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime) > > PRUint32 serial = ogg_page_serialno(&page); > nsOggCodecState* codecState = nsnull; > mCodecStates.Get(serial, &codecState); > if (codecState && codecState->mActive) { > startTime = codecState->Time(granulepos) - aStartTime; > NS_ASSERTION(startTime > 0, "Must have positive start time"); > } >+ else if(codecState) { >+ // Page is for an inactive stream, skip it. >+ startOffset += page.header_len + page.body_len; >+ continue; >+ } >+ else { >+ // Page is for a stream we don't know about (possibly a chained >+ // ogg), return an error. >+ return PAGE_SYNC_ERROR; >+ } > } > > if (startTime != -1) { > // We were able to find a start time for that range, see if we can > // find an end time. > PRInt64 endTime = FindEndTime(endOffset, PR_TRUE, &state); > if (endTime != -1) { > endTime -= aStartTime;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
cajbir
: review+
Actions:
View
|
Diff
|
Review
Attachments on
bug 584615
:
463425
|
463426
|
463428
|
464304
|
464313
|
466922
|
468935
|
469714
|
470640
|
470693
|
470698
|
470713
|
471360
|
472321
|
473911
|
474858