[FFmpeg-cvslog] ffprobe: fix infinite loop in subtitle decoding
Marton Balint
git at videolan.org
Mon Mar 12 22:55:25 EET 2018
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Mar 11 18:02:12 2018 +0100| [68f5384804fa86af2737f7b08799c9ca2c306db4] | committer: Marton Balint
ffprobe: fix infinite loop in subtitle decoding
Fixes a regression since 2a88ebd096f3c748a2d99ed1b60b22879b3c567c which caused
an infinite loop in the subtitle decoding.
Fixes ticket #6796.
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68f5384804fa86af2737f7b08799c9ca2c306db4
---
fftools/ffprobe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 967adbe30c..a4ac6972a2 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2275,7 +2275,8 @@ static av_always_inline int process_frame(WriterContext *w,
break;
case AVMEDIA_TYPE_SUBTITLE:
- ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_frame, pkt);
+ if (*packet_new)
+ ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_frame, pkt);
*packet_new = 0;
break;
default:
More information about the ffmpeg-cvslog
mailing list