[Libav-user] Assigning Values To Allocated Memory
Mariah Smith
mariah.cherice at gmail.com
Thu Sep 17 04:01:56 EEST 2020
Hello,
I am following the example at
http://ffmpeg.org/doxygen/4.1/transcode_aac_8c-example.html for an Android
application.
I ported over the init_converted_samples function as I need to do something
similar, in my code I call it init_data_planes:
[image: Screen Shot 2020-09-16 at 7.28.21 PM.png]
I'm using this in an encoding loop, same as the example. In the loop I am
getting a vector of packed float data ("dequeuedVector") and want to fill a
2D array ("dequeued_samples") with that packed float data to unpack it,
which I am then putting in an AVAudioFifo. I'm simply using nested for
loops to populate the 2D array from the packed float data (not doing the
unpacking here for simplicity):
[image: Screen Shot 2020-09-16 at 7.36.58 PM.png]
My issue is when I'm checking the data is filling dequeued_samples
correctly (using the __android_log_print to check), it's always 0.0f
(dequeued_samples[i][j]). dequeuedVector[j] is the correct float value. I'm
passing in the float sample format in the av_samples_alloc function so I'm
assuming the library is allocating memory for float samples properly.
What am I missing?
--
Mariah Smith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200916/2d75a2be/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2020-09-16 at 7.28.21 PM.png
Type: image/png
Size: 218831 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200916/2d75a2be/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2020-09-16 at 7.36.58 PM.png
Type: image/png
Size: 212158 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200916/2d75a2be/attachment-0001.png>
More information about the Libav-user
mailing list