diff --git a/dlib/media/ffmpeg_demuxer.h b/dlib/media/ffmpeg_demuxer.h index 754ce3dcc..9dbb87513 100644 --- a/dlib/media/ffmpeg_demuxer.h +++ b/dlib/media/ffmpeg_demuxer.h @@ -1475,7 +1475,7 @@ namespace dlib { ok = parse(); - if (ok && st.packet->size > 0) + if (ok && channel && st.packet->size > 0) { // Decode ok = channel->push(st.packet, wrap(st.frame_queue));