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
4f0d4acc
Commit
4f0d4acc
authored
Mar 02, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libxvid: cleanup on error pathes
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
667bf156
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
libxvid.c
libavcodec/libxvid.c
+10
-5
No files found.
libavcodec/libxvid.c
View file @
4f0d4acc
...
...
@@ -73,6 +73,8 @@ struct xvid_ff_pass1 {
struct
xvid_context
*
context
;
/**< Pointer to private context */
};
static
int
xvid_encode_close
(
AVCodecContext
*
avctx
);
/*
* Xvid 2-Pass Kludge Section
*
...
...
@@ -477,7 +479,7 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
if
(
x
->
twopassbuffer
==
NULL
||
x
->
old_twopassbuffer
==
NULL
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Xvid: Cannot allocate 2-pass log buffers
\n
"
);
return
-
1
;
goto
fail
;
}
x
->
twopassbuffer
[
0
]
=
x
->
old_twopassbuffer
[
0
]
=
0
;
...
...
@@ -492,21 +494,21 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
if
(
fd
==
-
1
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Xvid: Cannot write 2-pass pipe
\n
"
);
return
-
1
;
goto
fail
;
}
x
->
twopassfd
=
fd
;
if
(
avctx
->
stats_in
==
NULL
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Xvid: No 2-pass information loaded for second pass
\n
"
);
return
-
1
;
goto
fail
;
}
if
(
strlen
(
avctx
->
stats_in
)
>
write
(
fd
,
avctx
->
stats_in
,
strlen
(
avctx
->
stats_in
))
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Xvid: Cannot write to 2-pass pipe
\n
"
);
return
-
1
;
goto
fail
;
}
rc2pass2
.
filename
=
x
->
twopassfile
;
...
...
@@ -606,13 +608,16 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
xerr
=
xvid_encore
(
NULL
,
XVID_ENC_CREATE
,
&
xvid_enc_create
,
NULL
);
if
(
xerr
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Xvid: Could not create encoder reference
\n
"
);
return
-
1
;
goto
fail
;
}
x
->
encoder_handle
=
xvid_enc_create
.
handle
;
avctx
->
coded_frame
=
&
x
->
encoded_picture
;
return
0
;
fail:
xvid_encode_close
(
avctx
);
return
-
1
;
}
static
int
xvid_encode_frame
(
AVCodecContext
*
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