Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f9bd6d61
Commit
f9bd6d61
authored
Aug 01, 2014
by
Benoit Fouet
Committed by
Michael Niedermayer
Aug 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264_mp4toannexb_bsf: rename first_idr to new_idr
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
293124ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
h264_mp4toannexb_bsf.c
libavcodec/h264_mp4toannexb_bsf.c
+8
-8
No files found.
libavcodec/h264_mp4toannexb_bsf.c
View file @
f9bd6d61
...
...
@@ -27,7 +27,7 @@
typedef
struct
H264BSFContext
{
uint8_t
length_size
;
uint8_t
first
_idr
;
uint8_t
new
_idr
;
uint8_t
idr_sps_pps_seen
;
int
extradata_parsed
;
}
H264BSFContext
;
...
...
@@ -155,7 +155,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
if
(
ret
<
0
)
return
ret
;
ctx
->
length_size
=
ret
;
ctx
->
first_idr
=
1
;
ctx
->
new_idr
=
1
;
ctx
->
idr_sps_pps_seen
=
0
;
ctx
->
extradata_parsed
=
1
;
}
...
...
@@ -182,22 +182,22 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
/* if this is a new IDR picture following an IDR picture, reset the idr flag.
* Just check first_mb_in_slice to be 0 as this is the simplest solution.
* This could be checking idr_pic_id instead, but would complexify the parsing. */
if
(
!
ctx
->
first
_idr
&&
unit_type
==
5
&&
(
buf
[
1
]
&
0x80
))
ctx
->
first
_idr
=
1
;
if
(
!
ctx
->
new
_idr
&&
unit_type
==
5
&&
(
buf
[
1
]
&
0x80
))
ctx
->
new
_idr
=
1
;
/* prepend only to the first type 5 NAL unit of an IDR picture, if no sps/pps are already present */
if
(
ctx
->
first
_idr
&&
unit_type
==
5
&&
!
ctx
->
idr_sps_pps_seen
)
{
if
(
ctx
->
new
_idr
&&
unit_type
==
5
&&
!
ctx
->
idr_sps_pps_seen
)
{
if
((
ret
=
alloc_and_copy
(
poutbuf
,
poutbuf_size
,
avctx
->
extradata
,
avctx
->
extradata_size
,
buf
,
nal_size
))
<
0
)
goto
fail
;
ctx
->
first
_idr
=
0
;
ctx
->
new
_idr
=
0
;
}
else
{
if
((
ret
=
alloc_and_copy
(
poutbuf
,
poutbuf_size
,
NULL
,
0
,
buf
,
nal_size
))
<
0
)
goto
fail
;
if
(
!
ctx
->
first
_idr
&&
unit_type
==
1
)
{
ctx
->
first
_idr
=
1
;
if
(
!
ctx
->
new
_idr
&&
unit_type
==
1
)
{
ctx
->
new
_idr
=
1
;
ctx
->
idr_sps_pps_seen
=
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment