HandleDecodeError called too late

RESOLVED FIXED

Status

()

Core
Audio/Video
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: kinetik, Assigned: kinetik)

Tracking

({fixed1.9.1})

1.9.1 Branch
fixed1.9.1
Points:
---
Bug Flags:
wanted1.9.1 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
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?
(Assignee)

Comment 1

9 years ago
Created attachment 381441 [details] [diff] [review]
patch v0 for 1.9.1 only (already on trunk)

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
Last Resolved: 9 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.