Skip to content

Commit

Permalink
fix video playback: rendering offset
Browse files Browse the repository at this point in the history
  • Loading branch information
xmoezzz authored and DCNick3 committed May 2, 2024
1 parent 2a954e9 commit c934ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shin-video/src/h264_decoder/gstreamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl super::H264DecoderTrait for GStreamerH264Decoder {
gst::ClockTime::from_useconds(time * 1_000_000 / time_base as u64)
};

let start_time = mp4_time_to_gst_time(sample.start_time);
let start_time = mp4_time_to_gst_time((sample.start_time as i64 + sample.rendering_offset as i64) as u64);
let duration = mp4_time_to_gst_time(sample.duration as u64);

bitstream_converter.convert_packet(&sample.bytes, &mut vec_buffer);
Expand Down

0 comments on commit c934ea7

Please sign in to comment.