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
d32926db
Commit
d32926db
authored
Feb 12, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/riff: return error code from ff_get_guid()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8c5fece1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
riff.h
libavformat/riff.h
+1
-1
riffdec.c
libavformat/riffdec.c
+5
-2
No files found.
libavformat/riff.h
View file @
d32926db
...
...
@@ -91,7 +91,7 @@ static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
return
memcmp
(
g1
,
g2
,
sizeof
(
ff_asf_guid
));
}
void
ff_get_guid
(
AVIOContext
*
s
,
ff_asf_guid
*
g
);
int
ff_get_guid
(
AVIOContext
*
s
,
ff_asf_guid
*
g
);
void
ff_put_guid
(
AVIOContext
*
s
,
const
ff_asf_guid
*
g
);
const
ff_asf_guid
*
get_codec_guid
(
enum
AVCodecID
id
,
const
AVCodecGuid
*
av_guid
);
...
...
libavformat/riffdec.c
View file @
d32926db
...
...
@@ -29,11 +29,14 @@
#include "avio_internal.h"
#include "riff.h"
void
ff_get_guid
(
AVIOContext
*
s
,
ff_asf_guid
*
g
)
int
ff_get_guid
(
AVIOContext
*
s
,
ff_asf_guid
*
g
)
{
av_assert0
(
sizeof
(
*
g
)
==
16
);
//compiler will optimize this out
if
(
avio_read
(
s
,
*
g
,
sizeof
(
*
g
))
<
(
int
)
sizeof
(
*
g
))
if
(
avio_read
(
s
,
*
g
,
sizeof
(
*
g
))
<
(
int
)
sizeof
(
*
g
))
{
memset
(
*
g
,
0
,
sizeof
(
*
g
));
return
AVERROR_INVALIDDATA
;
}
return
0
;
}
enum
AVCodecID
ff_codec_guid_get_id
(
const
AVCodecGuid
*
guids
,
ff_asf_guid
guid
)
...
...
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