summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/subviewerdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/subviewerdec.c b/libavcodec/subviewerdec.c
index 7580cbe679..63be4188b9 100644
--- a/libavcodec/subviewerdec.c
+++ b/libavcodec/subviewerdec.c
@@ -56,7 +56,7 @@ static int subviewer_decode_frame(AVCodecContext *avctx,
AVBPrint buf;
/* To be removed later */
- if (sscanf(ptr, "%*u:%*u:%*u.%*u,%*u:%*u:%*u.%*u%c", &c) == 1) {
+ if (ptr && sscanf(ptr, "%*u:%*u:%*u.%*u,%*u:%*u:%*u.%*u%c", &c) == 1) {
av_log(avctx, AV_LOG_ERROR, "AVPacket is not clean (contains timing "
"information). You need to upgrade your libavformat or "
"sanitize your packet.\n");