mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-04 23:20:40 +00:00
lavu/samplefmt: return the size of the allocated samples buffer at the next bump
Make the functions av_samples_fill_arrays, av_samples_alloc, and avcodec_fill_audio_frame return a buffer size rather than 0 in case of success. This will be enabled at the next libavutil major bump, in order to preserve backward compatibility. Returning the size allows to simplify the code, avoiding a few function calls.
This commit is contained in:
@@ -4780,7 +4780,9 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
|
||||
* @param buf buffer to use for frame data
|
||||
* @param buf_size size of buffer
|
||||
* @param align plane size sample alignment (0 = default)
|
||||
* @return 0 on success, negative error code on failure
|
||||
* @return >=0 on success, negative error code on failure
|
||||
* @todo return the size of the allocated frame size in case of
|
||||
* success, at the next libavutil bump
|
||||
*/
|
||||
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
|
||||
enum AVSampleFormat sample_fmt, const uint8_t *buf,
|
||||
|
||||
Reference in New Issue
Block a user