Comment #6 on issue 17456 by bugdro...@chromium.org: ogv seek crash
http://code.google.com/p/chromium/issues/detail?id=17456

The following revision refers to this bug:
     http://src.chromium.org/viewvc/chrome?view=rev&revision=21799

------------------------------------------------------------------------
r21799 | lafo...@chromium.org | 2009-07-27 19:11:34 -0700 (Mon, 27 Jul  
2009) | 23 lines
Changed paths:
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/base/filters.h?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/base/pipeline.h?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/base/pipeline_impl.cc?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/base/pipeline_impl.h?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/base/pipeline_impl_unittest.cc?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/audio_renderer_base.cc?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/audio_renderer_base.h?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/audio_renderer_base_unittest.cc?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/decoder_base.h?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/ffmpeg_demuxer.cc?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/ffmpeg_video_decoder.cc?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/ffmpeg_video_decoder.h?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/ffmpeg_video_decoder_unittest.cc?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/video_renderer_base.cc?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/video_renderer_base.h?r1=21799&r2=21798
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/media/filters/video_renderer_base_unittest.cc?r1=21799&r2=21798

Merge 21611 - Implemented proper pausethenseek behaviour for the media  
pipeline.

MediaFilter now has asynchronous Play() and Pause() methods that are  
implemented by default.  Since we are a completely pullbased system, it  
turns out only AudioRendererBase and VideoRendererBase need to override  
them to halt reading from decoders.

When a seek is received by the pipeline, it goes through the following  
state transitions:
  1) Playing > Pausing > Paused (notify filters to stop reading)
  2) Paused > Seeking (notify filters to flush buffers and preroll)
  3) Seeking > Playing (preroll completed, resume playback)

The key to this system is that there must be no pending reads in *any*  
filter when we start transitioning into the seeking state.  That means the  
audio/video renderers do not complete their pausing>paused transition until  
they have completed all pending reads.  To reiterate, since we're pulled  
based if the renderers are not reading any data, then *nothing* is  
happening in the pipeline.

We get a lot of nice benefits from this assertion, namely no callbacks are  
ever "lost", they are always replied to until we are fully paused.   
Furthermore, we can guarantee that the first buffer received after a Seek()  
will be guaranteed to be discontinuous.

This change also properly handles endofstream, seeking from an endofstream  
state, and displaying frames while paused.  In summary, I was able to call  
Seek() in a while(true) loop without crashing or going out of sync.

BUG=16014,16021,17456
TEST=seeking should be way more robust

Review URL: http://codereview.chromium.org/160005

tbr=scher...@chromium.org

Review URL: http://codereview.chromium.org/159476
------------------------------------------------------------------------


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to