You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +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:
committed by
Anton Khirnov
parent
2d6baff0c0
commit
42271f8e18
@@ -1981,6 +1981,11 @@ AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx)
|
|||||||
AVPacketSideData *tmp;
|
AVPacketSideData *tmp;
|
||||||
AVCPBProperties *props;
|
AVCPBProperties *props;
|
||||||
size_t size;
|
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);
|
props = av_cpb_properties_alloc(&size);
|
||||||
if (!props)
|
if (!props)
|
||||||
|
Reference in New Issue
Block a user