mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avcodec/utils: Fix ff_add_cpb_side_data() add twice
Makes it behave similarly to av_stream_add_side_data(). Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
2d6baff0c0
commit
42271f8e18
@ -1981,6 +1981,11 @@ AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx)
|
||||
AVPacketSideData *tmp;
|
||||
AVCPBProperties *props;
|
||||
size_t size;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < avctx->nb_coded_side_data; i++)
|
||||
if (avctx->coded_side_data[i].type == AV_PKT_DATA_CPB_PROPERTIES)
|
||||
return (AVCPBProperties *)avctx->coded_side_data[i].data;
|
||||
|
||||
props = av_cpb_properties_alloc(&size);
|
||||
if (!props)
|
||||
|
Loading…
x
Reference in New Issue
Block a user