Last Comment Bug 686957 - Final video frame is not displayed when seeking to end
: Final video frame is not displayed when seeking to end
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: cajbir (:cajbir)
:
Mentors:
http://code.chirls.com/frames/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-15 13:55 PDT by Matthew Gregan [:kinetik]
Modified: 2011-10-17 02:49 PDT (History)
2 users (show)
cajbir.bugzilla: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix (1.98 KB, patch)
2011-09-26 20:46 PDT, cajbir (:cajbir)
kinetik: review+
Details | Diff | Review
Test (312.43 KB, patch)
2011-09-28 22:28 PDT, cajbir (:cajbir)
kinetik: review+
Details | Diff | Review

Description Matthew Gregan [:kinetik] 2011-09-15 13:55:31 PDT
Open testcase.  Click "jump to 6 seconds".  Tab into the video.  Hit "end".  The currentTime is reported correctly, but the displayed frame (and frame grabbed by canvas) are still at 6 seconds.
Comment 1 cajbir (:cajbir) 2011-09-26 20:46:51 PDT
Created attachment 562654 [details] [diff] [review]
Fix

When decoding to target, ensure last frame is kept when we hit eof so it can be displayed.
Comment 2 cajbir (:cajbir) 2011-09-28 22:28:19 PDT
Created attachment 563314 [details] [diff] [review]
Test

Test implemented as a reftest. It compares a seek to the end vs a play to the end.
Comment 3 Matthew Gregan [:kinetik] 2011-09-29 16:29:54 PDT
Comment on attachment 563314 [details] [diff] [review]
Test

Review of attachment 563314 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/reftests/webm-video/bug686957-ref.html
@@ +3,5 @@
> +<body style="background:white;">
> +<!-- Test that if we seek to the end of a video we get the last frame displayed -->
> +<video src="frames.webm"
> +       preload="auto"
> +       autoplay

I'm slightly concerned that autoplay could cause the video to play to the end before the loadedmetadata handler had run, causing two ended events, of which the first would run immediately after seeking back 1 second.  The test should be more reliable if play() is called in the loadedmetadata handler after the seek request, I think.
Comment 4 Chris Pearce (:cpearce) 2011-09-29 17:03:36 PDT
Comment on attachment 563314 [details] [diff] [review]
Test

Review of attachment 563314 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/reftests/webm-video/bug686957-ref.html
@@ +1,5 @@
> +<!DOCTYPE HTML>
> +<html class="reftest-wait">
> +<body style="background:white;">
> +<!-- Test that if we seek to the end of a video we get the last frame displayed -->
> +<video src="frames.webm"

Does frames.webm contain only keyframes? If skip-to-keyframe kicked in, we could end up dropping frames, causing the test to fail?
Comment 5 cajbir (:cajbir) 2011-10-09 17:36:26 PDT
(In reply to Chris Pearce (:cpearce) (Mozilla Corporation) from comment #4)
> Does frames.webm contain only keyframes? If skip-to-keyframe kicked in, we
> could end up dropping frames, causing the test to fail?

We should still show the last frame even if skip-to-keyframe happens shouldn't we? It seems to me the last frame should be shown always if we hit the end of the video via playback.

Note You need to log in before you can comment on or make changes to this bug.