Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VVCSoftware_VTM
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jvet
VVCSoftware_VTM
Commits
4888e2ff
Commit
4888e2ff
authored
2 years ago
by
Xiang Li
Browse files
Options
Downloads
Patches
Plain Diff
Fix a bug with y4m frame header reading (trigger assert when reaching file end)
parent
4a8ec6af
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2246
Y4M support at both encoder and decoder (#206)
Pipeline
#7486
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/Lib/Utilities/VideoIOYuv.cpp
+7
-3
7 additions, 3 deletions
source/Lib/Utilities/VideoIOYuv.cpp
with
7 additions
and
3 deletions
source/Lib/Utilities/VideoIOYuv.cpp
+
7
−
3
View file @
4888e2ff
...
...
@@ -1064,9 +1064,13 @@ bool VideoIOYuv::read ( PelUnitBuf& pic, PelUnitBuf& picOrg, const InputColourSp
if
(
m_inY4mFileHeaderLength
)
{
char
y4mFrameHeader
[
Y4M_FRAME_HEADER_LENGTH
];
m_cHandle
.
read
(
y4mFrameHeader
,
Y4M_FRAME_HEADER_LENGTH
);
CHECK
(
strncmp
(
y4mFrameHeader
,
"FRAME"
,
Y4M_FRAME_HEADER_LENGTH
-
1
),
"Wrong Y4M frame header!"
);
char
frameHeader
[
Y4M_FRAME_HEADER_LENGTH
+
1
];
m_cHandle
.
read
(
frameHeader
,
Y4M_FRAME_HEADER_LENGTH
);
if
(
m_cHandle
.
eof
()
||
m_cHandle
.
fail
())
{
return
false
;
}
CHECK
(
strncmp
(
frameHeader
,
y4mFrameHeader
,
Y4M_FRAME_HEADER_LENGTH
),
"Wrong Y4M frame header!"
);
}
const
PelBuf
areaBufY
=
picOrg
.
get
(
COMPONENT_Y
);
...
...
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