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<FFmpegCapture *>(card->capture.get());
userdata->has_last_subtitle = ffmpeg_capture->get_has_last_subtitle();
userdata->last_subtitle = ffmpeg_capture->get_last_subtitle();
if (video_frame.len - video_offset == 0 ||
video_frame.len - video_offset != expected_length) {
if (video_frame.len != 0) {
- printf("%s: Dropping video frame with wrong length (%ld; expected %ld)\n",
+ printf("%s: Dropping video frame with wrong length (%zu; expected %zu)\n",
spec_to_string(device).c_str(), video_frame.len - video_offset, expected_length);
}
if (video_frame.owner) {