X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fmixer.cpp;h=d1b52ef2dc54b4a9db8ad84e755bbadc4ac76411;hb=39889eeed810016fd7d277d8bbfcc58e6f305c82;hp=f8c39e877f394d68f9f30df967436701d30111f5;hpb=8f9854b994be8dead8a5a1e9921402b7e1d6f12c;p=nageru diff --git a/nageru/mixer.cpp b/nageru/mixer.cpp index f8c39e8..d1b52ef 100644 --- a/nageru/mixer.cpp +++ b/nageru/mixer.cpp @@ -795,7 +795,7 @@ void Mixer::bm_frame(unsigned card_index, uint16_t timecode, card->last_timecode = timecode; PBOFrameAllocator::Userdata *userdata = (PBOFrameAllocator::Userdata *)video_frame.userdata; - if (card->type == CardType::FFMPEG_INPUT) { + if (card->type == CardType::FFMPEG_INPUT && userdata != nullptr) { FFmpegCapture *ffmpeg_capture = static_cast(card->capture.get()); userdata->has_last_subtitle = ffmpeg_capture->get_has_last_subtitle(); userdata->last_subtitle = ffmpeg_capture->get_last_subtitle(); @@ -1082,7 +1082,7 @@ void Mixer::thread_func() } // Only bother doing MJPEG encoding if there are any connected clients - // that want the stream. + // that want the stream. FIXME: We should also stop memcpy-ing if there are none! if (httpd.get_num_connected_multicam_clients() > 0) { auto stream_it = global_flags.card_to_mjpeg_stream_export.find(card_index); if (stream_it != global_flags.card_to_mjpeg_stream_export.end()) {