X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fmixer.cpp;h=9fd1e153ce71592adc782dba326a187463d72fcf;hb=f9a11c73b0c2ff2d44d79f856998f8cbfc88a478;hp=7ef2a4c576d185fb72a9e0895cb9cd3142248a8b;hpb=0b3495b854b286a3c0e54b80148d9dbca6921b96;p=nageru diff --git a/nageru/mixer.cpp b/nageru/mixer.cpp index 7ef2a4c..9fd1e15 100644 --- a/nageru/mixer.cpp +++ b/nageru/mixer.cpp @@ -795,6 +795,11 @@ 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) { + 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(); + } size_t cbcr_width, cbcr_height, cbcr_offset, y_offset; size_t expected_length = video_format.stride * (video_format.height + video_format.extra_lines_top + video_format.extra_lines_bottom); @@ -860,6 +865,7 @@ void Mixer::bm_frame(unsigned card_index, uint16_t timecode, } frame_upload_start = steady_clock::now(); } + assert(userdata != nullptr); userdata->last_interlaced = video_format.interlaced; userdata->last_has_signal = video_format.has_signal; userdata->last_is_connected = video_format.is_connected;