Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
427
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
284e3f6a
Commit
284e3f6a
authored
2 years ago
by
François Cartegnie
Committed by
Steve Lhomme
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
demux: avi: add tag index keyframe for H26x
parent
f2afde1e
No related branches found
Branches containing commit
No related tags found
1 merge request
!2772
demux: avi: add tag index keyframe for H26x
Pipeline
#279616
passed with stage
Stage:
in 14 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/demux/avi/avi.c
+29
-0
29 additions, 0 deletions
modules/demux/avi/avi.c
with
29 additions
and
0 deletions
modules/demux/avi/avi.c
+
29
−
0
View file @
284e3f6a
...
...
@@ -46,6 +46,8 @@
#include
"libavi.h"
#include
"../rawdv.h"
#include
"bitmapinfoheader.h"
#include
"../packetizer/h264_nal.h"
#include
"../packetizer/hevc_nal.h"
/*****************************************************************************
* Module descriptor
...
...
@@ -2127,6 +2129,33 @@ static int AVI_GetKeyFlag( const avi_track_t *tk, const uint8_t *p_byte )
}
return
p_byte
[
4
]
&
0xC0
?
0
:
AVIIF_KEYFRAME
;
case
VLC_CODEC_H264
:
{
uint32_t
bytes
=
GetDWBE
(
p_byte
);
enum
h264_nal_unit_type_e
i_nal_type
;
if
(
bytes
==
0x00000001
)
i_nal_type
=
h264_getNALType
(
&
p_byte
[
4
]
);
else
if
(
(
bytes
&
0xFFFFFF00
)
==
0x00000100
)
i_nal_type
=
h264_getNALType
(
&
p_byte
[
3
]
);
else
return
i_nal_type
=
0
;
return
(
i_nal_type
==
H264_NAL_SLICE_IDR
)
?
AVIIF_KEYFRAME
:
0
;
}
case
VLC_CODEC_HEVC
:
{
uint32_t
bytes
=
GetDWBE
(
p_byte
);
uint8_t
i_nal_type
;
if
(
bytes
==
0x00000001
)
i_nal_type
=
hevc_getNALType
(
&
p_byte
[
4
]
);
else
if
(
(
bytes
&
0xFFFFFF00
)
==
0x00000100
)
i_nal_type
=
hevc_getNALType
(
&
p_byte
[
3
]
);
else
i_nal_type
=
0
;
return
(
i_nal_type
>=
HEVC_NAL_IDR_W_RADL
&&
i_nal_type
<=
HEVC_NAL_CRA
)
?
AVIIF_KEYFRAME
:
0
;
}
default:
/* I can't do it, so say yes */
return
AVIIF_KEYFRAME
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment