[vlc-commits] [Git][videolan/vlc][master] 3 commits: packetizer/av1: fill the full extradata if it doesn't have the optional OBU
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Nov 30 15:25:20 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a95213e2 by Steve Lhomme at 2024-11-30T15:13:12+00:00
packetizer/av1: fill the full extradata if it doesn't have the optional OBU
The optional part needed by the decoders.
This will restart the decoders if needed, but they should have received no frames yet
or the hardware decoder may be usable again or not (after a sequence header change).
- - - - -
f05f3388 by Steve Lhomme at 2024-11-30T15:13:12+00:00
demux/mkv: force the packetizer to fill AV1 extradata without optional OBUs
The hardware decoders need it and the packetizer can fill it for us.
- - - - -
fe8b4bf9 by Steve Lhomme at 2024-11-30T15:13:12+00:00
demux/mp4: force the packetizer to fill AV1 extradata without optional OBUs
The hardware decoders need it and the packetizer can fill it for us.
- - - - -
3 changed files:
- modules/demux/mkv/matroska_segment_parse.cpp
- modules/demux/mp4/essetup.c
- modules/packetizer/av1.c
Changes:
=====================================
modules/demux/mkv/matroska_segment_parse.cpp
=====================================
@@ -1841,6 +1841,8 @@ bool matroska_segment_c::TrackInit( mkv_track_t * p_tk )
vars.p_tk->b_pts_only = true;
fill_extra_data( vars.p_tk, 0 );
+ if (vars.p_fmt->i_extra <= 4)
+ vars.p_fmt->b_packetized = false; // force full extradata by the packetizer
}
S_CASE("V_CAVS") {
vars.p_fmt->i_codec = VLC_CODEC_CAVS;
=====================================
modules/demux/mp4/essetup.c
=====================================
@@ -619,6 +619,8 @@ int SetupVideoES( demux_t *p_demux, const mp4_track_t *p_track, const MP4_Box_t
CopyExtradata( BOXDATA(p_av1C)->p_av1C,
BOXDATA(p_av1C)->i_av1C,
p_fmt );
+ if (p_fmt->i_extra <= 4)
+ p_fmt->b_packetized = false; // force full extradata by the packetizer
}
break;
}
=====================================
modules/packetizer/av1.c
=====================================
@@ -161,8 +161,9 @@ static void UpdateDecoderFormat(decoder_t *p_dec)
p_dec->fmt_out.i_extra = 0;
}
- if(!p_dec->fmt_in->i_extra && !p_dec->fmt_out.i_extra)
+ if(p_dec->fmt_out.i_extra <= 4)
{
+ free(p_dec->fmt_out.p_extra);
p_dec->fmt_out.i_extra =
AV1_create_DecoderConfigurationRecord((uint8_t **)&p_dec->fmt_out.p_extra,
p_sys->p_sequence_header,
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/60f4201be943bb88d4718569a1474a41427bf846...fe8b4bf937ad08d17d69de07ae21e9f326e2bd96
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/60f4201be943bb88d4718569a1474a41427bf846...fe8b4bf937ad08d17d69de07ae21e9f326e2bd96
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list