diff options
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r-- | libavformat/hlsenc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 999fc0de75..4ef84c05c1 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1353,16 +1353,17 @@ static const char* get_relative_url(const char *master_url, const char *media_ur static int64_t get_stream_bit_rate(AVStream *stream) { - AVCPBProperties *props = (AVCPBProperties*)av_stream_get_side_data( - stream, - AV_PKT_DATA_CPB_PROPERTIES, - NULL + const AVPacketSideData *sd = av_packet_side_data_get( + stream->codecpar->coded_side_data, stream->codecpar->nb_coded_side_data, + AV_PKT_DATA_CPB_PROPERTIES ); if (stream->codecpar->bit_rate) return stream->codecpar->bit_rate; - else if (props) + else if (sd) { + AVCPBProperties *props = (AVCPBProperties*)sd->data; return props->max_bitrate; + } return 0; } |