Chromium Code Reviews| Index: webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.cc |
| diff --git a/webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.cc b/webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.cc |
| index 6880dc44a1a0c550b7a9241224d61923fc9a562f..d1a0b5daaff78472a26cf93c6a1e659b4218ce96 100644 |
| --- a/webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.cc |
| +++ b/webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.cc |
| @@ -332,9 +332,10 @@ base::TimeDelta FFmpegCdmAudioDecoder::GetNextOutputTimestamp() const { |
| } |
| void FFmpegCdmAudioDecoder::SerializeInt64(int64 value) { |
| - const uint8_t* ptr = reinterpret_cast<uint8_t*>(&value); |
| + uint8 data[sizeof(value)] = { 0 }; |
| + memcpy(data, &value, sizeof(value)); |
|
Ami GONE FROM CHROMIUM
2012/10/26 21:48:44
You could alternatively extend the vector by sizeo
xhwang
2012/10/26 22:28:13
Done.
|
| serialized_audio_frames_.insert(serialized_audio_frames_.end(), |
| - ptr, ptr + sizeof(value)); |
| + data, data + sizeof(value)); |
| } |
| } // namespace webkit_media |