Closed Bug 496246 Opened 15 years ago Closed 15 years ago

HandleDecodeError called too late

Categories

(Core :: Audio/Video, defect)

1.9.1 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: kinetik, Assigned: kinetik)

Details

(Keywords: fixed1.9.1)

Attachments

(1 file)

While comparing content/media/video and content/html/content/src/nsHTMLMediaElement.cpp between trunk and 1.9.1 to make sure the code has not diverged unexpectedly, I noticed what looks like a mismerge:

@@ -1331,11 +1331,11 @@
       aMonitor.Enter();
     } while (mState != DECODER_STATE_SHUTDOWN && r == E_OGGPLAY_TIMEOUT);
 
+    HandleDecodeErrors(r);
+
     if (mState == DECODER_STATE_SHUTDOWN)
       break;
 
-    HandleDecodeErrors(r);
-
     FrameData* nextFrame = NextFrame();
     if (!nextFrame)
       break;

This could lead to bugs, because HandleDecodeError can set mState to SHUTDOWN if an error occurred.  In the 1.9.1 variant of the code, this would happen too late, since we've already checked for mState == SHUTDOWN.
Flags: wanted1.9.1?
Sync 1.9.1 code to trunk.  As this code is already on trunk, it is safe to take it on 1.9.1.  Fixes an important error handling case.
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
Attachment #381441 - Flags: superreview?(roc)
Attachment #381441 - Flags: review?(roc)
Attachment #381441 - Flags: superreview?(roc)
Attachment #381441 - Flags: superreview+
Attachment #381441 - Flags: review?(roc)
Attachment #381441 - Flags: review+
Comment on attachment 381441 [details] [diff] [review]
patch v0 for 1.9.1 only (already on trunk)

trivial change to fix mismerge from trunk to branch
Attachment #381441 - Flags: approval1.9.1?
Flags: wanted1.9.1? → wanted1.9.1+
Attachment #381441 - Flags: approval1.9.1? → approval1.9.1+
Comment on attachment 381441 [details] [diff] [review]
patch v0 for 1.9.1 only (already on trunk)

a191=beltzner
https://hg.mozilla.org/releases/mozilla-1.9.1/rev/46d21040f011
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: fixed1.9.1
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: