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
cd78192d
Commit
cd78192d
authored
Oct 11, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/swfdec: return more meaningful error codes.
parent
5e885275
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
swfdec.c
libavformat/swfdec.c
+4
-4
No files found.
libavformat/swfdec.c
View file @
cd78192d
...
...
@@ -169,7 +169,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
/* Check for FLV1 */
vst
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
vst
)
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
vst
->
id
=
ch_id
;
vst
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
vst
->
codec
->
codec_id
=
ff_codec_get_id
(
ff_swf_codec_tags
,
avio_r8
(
pb
));
...
...
@@ -190,7 +190,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
swf
->
samples_per_frame
=
avio_rl16
(
pb
);
ast
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
ast
)
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
ast
->
id
=
-
1
;
/* -1 to avoid clash with video stream ch_id */
ast
->
codec
->
channels
=
1
+
(
v
&
1
);
ast
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
...
...
@@ -218,7 +218,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
v
=
avio_r8
(
pb
);
ast
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
ast
)
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
ast
->
id
=
ch_id
;
ast
->
codec
->
channels
=
1
+
(
v
&
1
);
ast
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
...
...
@@ -279,7 +279,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
if
(
i
==
s
->
nb_streams
)
{
vst
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
vst
)
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
vst
->
id
=
-
2
;
/* -2 to avoid clash with video stream and audio stream */
vst
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
vst
->
codec
->
codec_id
=
AV_CODEC_ID_MJPEG
;
...
...
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