| Index: media/base/android/media_source_player.h
|
| diff --git a/media/base/android/media_source_player.h b/media/base/android/media_source_player.h
|
| index 615918587065f8dba6180c57371790e818d9ce17..9ff1dc74650c6c892a11d98a2e241cbdd362c22d 100644
|
| --- a/media/base/android/media_source_player.h
|
| +++ b/media/base/android/media_source_player.h
|
| @@ -79,6 +79,8 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
|
| virtual void OnDemuxerDurationChanged(base::TimeDelta duration) OVERRIDE;
|
|
|
| private:
|
| + friend class MediaSourcePlayerTest;
|
| +
|
| // Update the current timestamp.
|
| void UpdateTimestamps(const base::TimeDelta& presentation_timestamp,
|
| size_t audio_output_bytes);
|
| @@ -271,9 +273,6 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
|
| // Object to calculate the current audio timestamp for A/V sync.
|
| scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_;
|
|
|
| - // Weak pointer passed to media decoder jobs for callbacks.
|
| - base::WeakPtrFactory<MediaSourcePlayer> weak_this_;
|
| -
|
| MediaDrmBridge* drm_bridge_;
|
|
|
| // No decryption key available to decrypt the encrypted buffer. In this case,
|
| @@ -287,7 +286,11 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
|
| // Whether |surface_| is currently used by the player.
|
| bool is_surface_in_use_;
|
|
|
| - friend class MediaSourcePlayerTest;
|
| + // Weak pointer passed to media decoder jobs for callbacks. NOTE: This must
|
| + // always be last so it's invalidated before other member variables might be
|
| + // accessed.
|
| + base::WeakPtrFactory<MediaSourcePlayer> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer);
|
| };
|
|
|
|
|