On Sat, 14 Jun 2014, Nidhi Makhijani wrote:
--- set extradata_size only on success libavformat/oggparsespeex.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c index 6d70e99..15f1be0 100644 --- a/libavformat/oggparsespeex.c +++ b/libavformat/oggparsespeex.c @@ -47,6 +47,8 @@ static int speex_header(AVFormatContext *s, int idx) { if (!spxp) { spxp = av_mallocz(sizeof(*spxp)); + if (!spxp) + return AVERROR(ENOMEM); os->private = spxp; } @@ -72,9 +74,12 @@ static int speex_header(AVFormatContext *s, int idx) { if (frames_per_packet) spxp->packet_size *= frames_per_packet; - st->codec->extradata_size = os->psize; st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
How many bytes does this allocate at this point, when we haven't set st->codec->extradata_size yet?
// Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
