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
ffe04c33
Commit
ffe04c33
authored
Nov 09, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libxvid: use the AVFrame API properly.
parent
863a670e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
libxvid.c
libavcodec/libxvid.c
+4
-4
No files found.
libavcodec/libxvid.c
View file @
ffe04c33
...
...
@@ -54,7 +54,6 @@ struct xvid_context {
int
me_flags
;
/**< Motion Estimation flags */
int
qscale
;
/**< Do we use constant scale? */
int
quicktime_format
;
/**< Are we in a QT-based format? */
AVFrame
encoded_picture
;
/**< Encoded frame information */
char
*
twopassbuffer
;
/**< Character buffer for two-pass */
char
*
old_twopassbuffer
;
/**< Old character buffer (two-pass) */
char
*
twopassfile
;
/**< second pass temp file name */
...
...
@@ -606,7 +605,9 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
}
x
->
encoder_handle
=
xvid_enc_create
.
handle
;
avctx
->
coded_frame
=
&
x
->
encoded_picture
;
avctx
->
coded_frame
=
av_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
return
0
;
}
...
...
@@ -617,7 +618,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int
xerr
,
i
,
ret
,
user_packet
=
!!
pkt
->
data
;
char
*
tmp
;
struct
xvid_context
*
x
=
avctx
->
priv_data
;
AVFrame
*
p
=
&
x
->
encoded_pictur
e
;
AVFrame
*
p
=
avctx
->
coded_fram
e
;
int
mb_width
=
(
avctx
->
width
+
15
)
/
16
;
int
mb_height
=
(
avctx
->
height
+
15
)
/
16
;
...
...
@@ -633,7 +634,6 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
/* Start setting up the frame */
xvid_enc_frame
.
version
=
XVID_VERSION
;
xvid_enc_stats
.
version
=
XVID_VERSION
;
*
p
=
*
picture
;
/* Let Xvid know where to put the frame. */
xvid_enc_frame
.
bitstream
=
pkt
->
data
;
...
...
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