From 297af3088c9bfe32dff361793067b45e6b3121a3 Mon Sep 17 00:00:00 2001 From: Jaroslaw Pelczar Date: Wed, 28 Aug 2019 17:19:23 +0200 Subject: [PATCH] mp3_decoder_test: Fix invalid taking address of temporary Signed-off-by: Jaroslaw Pelczar Change-Id: I2e41a048784a666de8937e224ee0cd8d17ba24ab Reviewed-on: https://review.haiku-os.org/c/haiku/+/1785 Reviewed-by: waddlesplash --- src/tests/kits/media/mp3_decoder_test/mp3_decoder_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests/kits/media/mp3_decoder_test/mp3_decoder_test.cpp b/src/tests/kits/media/mp3_decoder_test/mp3_decoder_test.cpp index 1e326d4fdb..5c1bee4bcf 100644 --- a/src/tests/kits/media/mp3_decoder_test/mp3_decoder_test.cpp +++ b/src/tests/kits/media/mp3_decoder_test/mp3_decoder_test.cpp @@ -128,8 +128,10 @@ main(int argc, char* argv[]) if (InitializeMp3DecodingCookie(&decodingCookie) != B_OK) exit(1); + media_format rawAudioFormat = CreateRawMediaFormat(); + media_raw_audio_format* audioOutputFormat - = &CreateRawMediaFormat().u.raw_audio; + = &rawAudioFormat.u.raw_audio; BSoundPlayer player(audioOutputFormat, "wave_player", Mp3Decoding, NULL, &decodingCookie);