On Wed, Jul 17, 2019 at 07:38:50PM -0300, James Almer wrote: > The API does not allow it. > > Also set poutbuf and poutbuf_size to NULL/0 on error to avoid leaving > them uninitialized. > > Signed-off-by: James Almer <jamr...@gmail.com> > --- > libavcodec/tak_parser.c | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/libavcodec/tak_parser.c b/libavcodec/tak_parser.c > index 835a47bd52..7943d2ed3a 100644 > --- a/libavcodec/tak_parser.c > +++ b/libavcodec/tak_parser.c > @@ -49,7 +49,7 @@ static int tak_parse(AVCodecParserContext *s, > AVCodecContext *avctx, > if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) { > TAKStreamInfo ti; > if ((ret = init_get_bits8(&gb, buf, buf_size)) < 0) > - return ret; > + goto fail; > if (!ff_tak_decode_frame_header(avctx, &gb, &ti, 127)) > s->duration = t->ti.last_frame_samples ? t->ti.last_frame_samples > : t->ti.frame_samples;
this would occur if buf_size is too big ( >250mb ) [...] > +fail: > + > + *poutbuf = NULL; > + *poutbuf_size = 0; > + return buf_size + consumed; and this would silently drop the data i think thats not ideal, it would be better to pass through packets which exceed the capabilities of the parser Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".