Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
f271a9bd
Unverified
Commit
f271a9bd
authored
Oct 04, 2016
by
Rodger Combs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/h264_parser: export field order in more cases
parent
d13740f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
h264_parser.c
libavcodec/h264_parser.c
+15
-1
No files found.
libavcodec/h264_parser.c
View file @
f271a9bd
...
@@ -61,6 +61,7 @@ typedef struct H264ParseContext {
...
@@ -61,6 +61,7 @@ typedef struct H264ParseContext {
int
parse_history_count
;
int
parse_history_count
;
int
parse_last_mb
;
int
parse_last_mb
;
int64_t
reference_dts
;
int64_t
reference_dts
;
int
last_frame_num
,
last_picture_structure
;
}
H264ParseContext
;
}
H264ParseContext
;
...
@@ -528,7 +529,19 @@ static inline int parse_nal_units(AVCodecParserContext *s,
...
@@ -528,7 +529,19 @@ static inline int parse_nal_units(AVCodecParserContext *s,
s
->
picture_structure
=
AV_PICTURE_STRUCTURE_TOP_FIELD
;
s
->
picture_structure
=
AV_PICTURE_STRUCTURE_TOP_FIELD
;
else
else
s
->
picture_structure
=
AV_PICTURE_STRUCTURE_BOTTOM_FIELD
;
s
->
picture_structure
=
AV_PICTURE_STRUCTURE_BOTTOM_FIELD
;
s
->
field_order
=
AV_FIELD_UNKNOWN
;
if
(
p
->
poc
.
frame_num
==
p
->
last_frame_num
&&
p
->
last_picture_structure
!=
AV_PICTURE_STRUCTURE_UNKNOWN
&&
p
->
last_picture_structure
!=
AV_PICTURE_STRUCTURE_FRAME
&&
p
->
last_picture_structure
!=
s
->
picture_structure
)
{
if
(
p
->
last_picture_structure
==
AV_PICTURE_STRUCTURE_TOP_FIELD
)
s
->
field_order
=
AV_FIELD_TT
;
else
s
->
field_order
=
AV_FIELD_BB
;
}
else
{
s
->
field_order
=
AV_FIELD_UNKNOWN
;
}
p
->
last_picture_structure
=
s
->
picture_structure
;
p
->
last_frame_num
=
p
->
poc
.
frame_num
;
}
}
av_freep
(
&
nal
.
rbsp_buffer
);
av_freep
(
&
nal
.
rbsp_buffer
);
...
@@ -677,6 +690,7 @@ static av_cold int init(AVCodecParserContext *s)
...
@@ -677,6 +690,7 @@ static av_cold int init(AVCodecParserContext *s)
H264ParseContext
*
p
=
s
->
priv_data
;
H264ParseContext
*
p
=
s
->
priv_data
;
p
->
reference_dts
=
AV_NOPTS_VALUE
;
p
->
reference_dts
=
AV_NOPTS_VALUE
;
p
->
last_frame_num
=
INT_MAX
;
ff_h264dsp_init
(
&
p
->
h264dsp
,
8
,
1
);
ff_h264dsp_init
(
&
p
->
h264dsp
,
8
,
1
);
return
0
;
return
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