|
|
@@ -3731,6 +3731,11 @@ int avpriv_bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf) |
|
|
ret = av_bprint_finalize(buf, &str); |
|
|
ret = av_bprint_finalize(buf, &str); |
|
|
if (ret < 0) |
|
|
if (ret < 0) |
|
|
return ret; |
|
|
return ret; |
|
|
|
|
|
if (!av_bprint_is_complete(buf)) { |
|
|
|
|
|
av_free(str); |
|
|
|
|
|
return AVERROR(ENOMEM); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
avctx->extradata = str; |
|
|
avctx->extradata = str; |
|
|
/* Note: the string is NUL terminated (so extradata can be read as a |
|
|
/* Note: the string is NUL terminated (so extradata can be read as a |
|
|
* string), but the ending character is not accounted in the size (in |
|
|
* string), but the ending character is not accounted in the size (in |
|
|
|