summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ffprobe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index 1f6e048245..71136516b9 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1661,6 +1661,7 @@ static av_always_inline int get_decoded_frame(AVFormatContext *fmt_ctx,
int ret = 0;
*got_frame = 0;
+ if (dec_ctx->codec) {
switch (dec_ctx->codec_type) {
case AVMEDIA_TYPE_VIDEO:
ret = avcodec_decode_video2(dec_ctx, frame, got_frame, pkt);
@@ -1670,6 +1671,7 @@ static av_always_inline int get_decoded_frame(AVFormatContext *fmt_ctx,
ret = avcodec_decode_audio4(dec_ctx, frame, got_frame, pkt);
break;
}
+ }
return ret;
}