On 1/30/2019 6:44 PM, Chris Cunningham wrote: > On Wed, Jan 30, 2019 at 1:40 PM James Almer <jamr...@gmail.com> wrote: > >> Parsers can't return negative values, only the output packet size. For >> the purpose of errors, they usually return the entire untouched packet >> size. >> > > Understood. Is this documented somewhere? I noted the comment in > av_paser_parse2(), "/* WARNING: the returned index can be negative */", and > guessed that signaled an error.
/* This callback never returns an error, a negative value means that * the frame start was in a previous packet. */ int (*parser_parse)(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size); So i was wrong in that it's not that it can't return negative values, just not for the purpose of signaling errors. > > >> And this definitely means there's a bug elsewhere. This parser should >> have not been used for codecs ids other than GSM and GSM_MS. That's >> precisely what this assert() is making sure of. >> > > I'll take a closer look at how this parser was selected. > > Thanks for the quick reply. > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel