Skip to content

Commit

Permalink
Fixing paused video doesn't react on changing device orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
kareljuricka committed Nov 27, 2020
1 parent 9fc1372 commit 581e317
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion shaka/src/media/apple_video_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ CGImageRef AppleVideoRenderer::Impl::Render(
if (delay)
*delay = loc_delay;

if (!frame || frame == prev_frame_)
const bool is_paused = player_->PlaybackState() == VideoPlaybackState::Paused;
if (!frame || (frame == prev_frame_ && !is_paused))
return nullptr;

if (sample_aspect_ratio)
Expand Down
7 changes: 4 additions & 3 deletions shaka/src/media/video_renderer_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ class VideoRendererCommon : public VideoRenderer, MediaPlayer::Client {
struct VideoPlaybackQuality VideoPlaybackQuality() const override;
bool SetVideoFillMode(VideoFillMode mode) override;

protected:
mutable Mutex mutex_;
const MediaPlayer* player_;

private:
void OnSeeking() override;

mutable Mutex mutex_;

const MediaPlayer* player_;
const DecodedStream* input_;
struct VideoPlaybackQuality quality_;
std::atomic<VideoFillMode> fill_mode_;
Expand Down

0 comments on commit 581e317

Please sign in to comment.