Android: Cache implementation name in VideoDecoderWrapper.

This fixes a crash caused by access to already freed memory returned
by VideoDecoderWrapper::ImplementationName method.

Bug: webrtc:7760
Change-Id: Ia4b020d1dd861e6a45637abde35f12951b7c43ea
Reviewed-on: https://webrtc-review.googlesource.com/9420
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20290}
This commit is contained in:
Sami Kalliomäki
2017-10-13 15:20:32 +02:00
committed by Commit Bot
parent ae012cf8b8
commit cee3e53631
2 changed files with 12 additions and 5 deletions

View File

@ -72,6 +72,8 @@ class VideoDecoderWrapper : public VideoDecoder {
rtc::Optional<uint8_t> ParseQP(const EncodedImage& input_image);
std::string GetImplementationName(JNIEnv* jni) const;
VideoCodec codec_settings_;
int32_t number_of_cores_;
@ -80,6 +82,7 @@ class VideoDecoderWrapper : public VideoDecoder {
std::deque<FrameExtraInfo> frame_extra_infos_;
bool qp_parsing_enabled_;
H264BitstreamParser h264_bitstream_parser_;
std::string implementation_name_;
DecodedImageCallback* callback_;