aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/thumbnailffmpeg_extractor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/thumbnailffmpeg_extractor.c')
-rw-r--r--src/plugins/thumbnailffmpeg_extractor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/thumbnailffmpeg_extractor.c b/src/plugins/thumbnailffmpeg_extractor.c
index c5d71f5..6d12572 100644
--- a/src/plugins/thumbnailffmpeg_extractor.c
+++ b/src/plugins/thumbnailffmpeg_extractor.c
@@ -415,7 +415,7 @@ extract_video (const unsigned char *data,
415 AVCodec *codec = NULL; 415 AVCodec *codec = NULL;
416 AVFrame *frame = NULL; 416 AVFrame *frame = NULL;
417 uint8_t *encoded_thumbnail; 417 uint8_t *encoded_thumbnail;
418 int video_stream_index; 418 int video_stream_index = -1;
419 int thumb_width; 419 int thumb_width;
420 int thumb_height; 420 int thumb_height;
421 int i; 421 int i;
@@ -495,7 +495,8 @@ RETRY_PROBE:
495 break; 495 break;
496 } 496 }
497 497
498 if ( (codec_ctx == NULL) || 498 if ( (video_stream_index == -1) ||
499 (codec_ctx == NULL) ||
499 (codec == NULL) || 500 (codec == NULL) ||
500 (codec_ctx->width == 0) || 501 (codec_ctx->width == 0) ||
501 (codec_ctx->height == 0) ) 502 (codec_ctx->height == 0) )