summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2018-03-11 18:02:12 +0100
committerMarton Balint <cus@passwd.hu>2018-03-12 21:11:06 +0100
commit68f5384804fa86af2737f7b08799c9ca2c306db4 (patch)
treec827db503b7f63fd3df16a33a5742b2e4b1e0fc5 /fftools
parent9c249110ea974ce213840fde5ee5a3d842fa088d (diff)
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@passwd.hu>
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffprobe.c3
1 files changed, 2 insertions, 1 deletions
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: