Skip to content

Commit 30b0aaa

Browse files
committed
refactor: modifications made based on reviews
1 parent abd8eb5 commit 30b0aaa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/mtmd/mtmd-video.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ static mtmd_bitmap* load_frames_from_dir(mtmd_context * ctx,
191191
return out_frames;
192192
}
193193

194+
// This Frames Queue is useful for streaming use case,
195+
// This frame queue is designed for streaming scenarios,
196+
// where an FFmpeg-related thread acts as the producer generating frames,
197+
// and the main program (the LLM inference thread) acts as the consumer processing them.
194198
struct DecodedFramesQueue {
195199
int width;
196200
int height;
@@ -501,8 +505,8 @@ static bool decode_video_ffmpeg_to_rgba_from_format_ctx(
501505
LOG_ERR("Different size frames remain in decoded frames queue");
502506
return false;
503507
}
504-
out_q.width = frame->width;
505-
out_q.height = frame->height;
508+
out_q.width = w;
509+
out_q.height = h;
506510

507511
while (av_read_frame(fmt, pkt) >= 0) {
508512
if (pkt->stream_index != vstream) { av_packet_unref(pkt); continue; }

0 commit comments

Comments
 (0)