diff options
author | hajimehoshi <hajimehoshi@chromium.org> | 2015-10-19 01:04:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-19 08:05:22 +0000 |
commit | 3d5d4e33ef71fecdafaaa920ad5a1b4fe03d13fb (patch) | |
tree | 0270e4cd1f2d6f686cb548f1e14c8c7354337e3f /media/base/video_decoder_config.h | |
parent | 8cfd9626b3e4ad0fa3822d3ca9da5791d6804247 (diff) | |
download | chromium_src-3d5d4e33ef71fecdafaaa920ad5a1b4fe03d13fb.zip chromium_src-3d5d4e33ef71fecdafaaa920ad5a1b4fe03d13fb.tar.gz chromium_src-3d5d4e33ef71fecdafaaa920ad5a1b4fe03d13fb.tar.bz2 |
Revert of Fail playback when VideoDecoderConfig has invalid extra data. (patchset #14 id:260001 of https://codereview.chromium.org/1396583002/ )
Reason for revert:
This causes a compile error on Mac (crbug.com/544748).
Original issue's description:
> Fail playback when VideoDecoderConfig has invalid extra data.
>
> Invalid extra data occurs when:
> (extra_data_ptr == NULL) != (extra_data_size == 0)
>
> We were previously crashing (CHECK) on this condition.
> {Audio|Video}DecoderConfig now use a vector and pointer/size issues
> are detected/handled in the path of creating the FFmpegDemuxerStream.
>
> BUG=517163
> TEST=New unit test. Manually verified graceful failure for MSE & SRC=
> R=bbudge@chromium.org, gunsch@chromium.org, sandersd@chromium.org, xhwang@chromium.org
>
> Committed: https://chromium.googlesource.com/chromium/src/+/54d0dc5450e6d8d6a7cd80bd9fa512a41999e08e
TBR=xhwang@chromium.org,bbudge@chromium.org,lcwu@chromium.org,gunsch@chromium.org,sandersd@chromium.org,chcunningham@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=517163
Review URL: https://codereview.chromium.org/1409353003
Cr-Commit-Position: refs/heads/master@{#354735}
Diffstat (limited to 'media/base/video_decoder_config.h')
-rw-r--r-- | media/base/video_decoder_config.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/media/base/video_decoder_config.h b/media/base/video_decoder_config.h index 3de0d2f..0dae77c8 100644 --- a/media/base/video_decoder_config.h +++ b/media/base/video_decoder_config.h @@ -35,7 +35,8 @@ class MEDIA_EXPORT VideoDecoderConfig { const gfx::Size& coded_size, const gfx::Rect& visible_rect, const gfx::Size& natural_size, - const std::vector<uint8_t>& extra_data, + const uint8* extra_data, + size_t extra_data_size, bool is_encrypted); ~VideoDecoderConfig(); @@ -48,7 +49,8 @@ class MEDIA_EXPORT VideoDecoderConfig { const gfx::Size& coded_size, const gfx::Rect& visible_rect, const gfx::Size& natural_size, - const std::vector<uint8_t>& extra_data, + const uint8* extra_data, + size_t extra_data_size, bool is_encrypted); // Returns true if this object has appropriate configuration values, false @@ -89,7 +91,8 @@ class MEDIA_EXPORT VideoDecoderConfig { // Optional byte data required to initialize video decoders, such as H.264 // AAVC data. - const std::vector<uint8_t>& extra_data() const { return extra_data_; } + const uint8* extra_data() const; + size_t extra_data_size() const { return extra_data_.size(); } // Whether the video stream is potentially encrypted. // Note that in a potentially encrypted video stream, individual buffers @@ -107,7 +110,7 @@ class MEDIA_EXPORT VideoDecoderConfig { gfx::Rect visible_rect_; gfx::Size natural_size_; - std::vector<uint8_t> extra_data_; + std::vector<uint8> extra_data_; bool is_encrypted_; |