On Sat, Dec 30, 2017 at 12:48:19AM +0300, ser...@gavrushkin.com wrote: > > Please add "Fixes ticket #6422" to the commit message. > > > > And maybe remove "rtsp" from the commit title, the issue > > is reproducible with files. > > Done. > > Please feel free to edit commit title/message as you wish for merge. > > Thank you, > Sergey > > ------------------------------------- > > > > From e90ef7b56d4147ff6555468f0154321b55596846 Mon Sep 17 00:00:00 2001 > From: Sergey Gavrushkin <ser...@gavrushkin.com <mailto:ser...@gavrushkin.com>> > Date: Fri, 29 Dec 2017 20:03:50 +0300 > Subject: [PATCH] h264: fix decoding > > Fixes ticket #6422 . It is a regression fix for an issue that was introduced > in commit > 98c97994c5b90bdae02accb155eeceeb5224b8ef. Variable err_recognition is > ignored while extradata is decoded and the whole decoding process is > failed due to timeout. > --- > libavcodec/h264_parse.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c > index fee28d9..009d50c 100644 > --- a/libavcodec/h264_parse.c > +++ b/libavcodec/h264_parse.c > @@ -347,7 +347,7 @@ int ff_h264_init_poc(int pic_field_poc[2], int *pic_poc, > } > > static int decode_extradata_ps(const uint8_t *data, int size, H264ParamSets > *ps, > - int is_avc, void *logctx) > + int is_avc, int err_recognition, void *logctx) > { > H2645Packet pkt = { 0 }; > int i, ret = 0; > @@ -363,13 +363,13 @@ static int decode_extradata_ps(const uint8_t *data, int > size, H264ParamSets *ps, > switch (nal->type) { > case H264_NAL_SPS: > ret = ff_h264_decode_seq_parameter_set(&nal->gb, logctx, ps, 0); > - if (ret < 0) > + if (ret < 0 && (err_recognition & AV_EF_EXPLODE)) > goto fail; > break; > case H264_NAL_PPS: > ret = ff_h264_decode_picture_parameter_set(&nal->gb, logctx, ps, > nal->size_bits); > - if (ret < 0) > + if (ret < 0 && (err_recognition & AV_EF_EXPLODE)) > goto fail; > break; > default:
The error code returned by decode_extradata_ps() is inconsistent after this its not "if any failed" it is returning an error if the last failed [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When you are offended at any man's fault, turn to yourself and study your own failings. Then you will forget your anger. -- Epictetus
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel