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
8346f60a
Commit
8346f60a
authored
Jun 03, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tty: factorise returning error codes.
parent
e762b1ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
tty.c
libavformat/tty.c
+12
-11
No files found.
libavformat/tty.c
View file @
8346f60a
...
...
@@ -73,21 +73,20 @@ static int read_header(AVFormatContext *avctx,
AVFormatParameters
*
ap
)
{
TtyDemuxContext
*
s
=
avctx
->
priv_data
;
int
width
=
0
,
height
=
0
,
ret
;
int
width
=
0
,
height
=
0
,
ret
=
0
;
AVStream
*
st
=
av_new_stream
(
avctx
,
0
);
if
(
!
st
)
return
AVERROR
(
ENOMEM
);
if
(
!
st
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
st
->
codec
->
codec_tag
=
0
;
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_id
=
CODEC_ID_ANSI
;
if
(
s
->
video_size
)
{
ret
=
av_parse_video_size
(
&
width
,
&
height
,
s
->
video_size
);
av_freep
(
&
s
->
video_size
);
if
(
ret
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Couldn't parse video size.
\n
"
);
return
ret
;
}
if
(
s
->
video_size
&&
(
ret
=
av_parse_video_size
(
&
width
,
&
height
,
s
->
video_size
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Couldn't parse video size.
\n
"
);
goto
fail
;
}
#if FF_API_FORMAT_PARAMETERS
if
(
ap
->
width
>
0
)
...
...
@@ -121,7 +120,9 @@ static int read_header(AVFormatContext *avctx,
avio_seek
(
avctx
->
pb
,
0
,
SEEK_SET
);
}
return
0
;
fail:
av_freep
(
&
s
->
video_size
);
return
ret
;
}
static
int
read_packet
(
AVFormatContext
*
avctx
,
AVPacket
*
pkt
)
...
...
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