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
13b8ba8c
Commit
13b8ba8c
authored
Feb 02, 2016
by
Timothy Gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xv: Remove AVPicture usage
parent
228eb670
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
xv.c
libavdevice/xv.c
+9
-6
No files found.
libavdevice/xv.c
View file @
13b8ba8c
...
...
@@ -291,7 +291,8 @@ static int xv_repaint(AVFormatContext *s)
return
0
;
}
static
int
write_picture
(
AVFormatContext
*
s
,
AVPicture
*
pict
)
static
int
write_picture
(
AVFormatContext
*
s
,
uint8_t
*
input_data
[
4
],
int
linesize
[
4
])
{
XVContext
*
xv
=
s
->
priv_data
;
XvImage
*
img
=
xv
->
yuv_image
;
...
...
@@ -313,18 +314,20 @@ static int write_picture(AVFormatContext *s, AVPicture *pict)
}
}
av_image_copy
(
data
,
img
->
pitches
,
(
const
uint8_t
**
)
pict
->
data
,
pict
->
linesize
,
av_image_copy
(
data
,
img
->
pitches
,
(
const
uint8_t
**
)
input_data
,
linesize
,
xv
->
image_format
,
img
->
width
,
img
->
height
);
return
xv_repaint
(
s
);
}
static
int
xv_write_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
AVPicture
pict
;
AVCodecContext
*
ctx
=
s
->
streams
[
0
]
->
codec
;
uint8_t
*
data
[
4
];
int
linesize
[
4
];
avpicture_fill
(
&
pict
,
pkt
->
data
,
ctx
->
pix_fmt
,
ctx
->
width
,
ctx
->
height
);
return
write_picture
(
s
,
&
pict
);
av_image_fill_arrays
(
data
,
linesize
,
pkt
->
data
,
ctx
->
pix_fmt
,
ctx
->
width
,
ctx
->
height
,
1
);
return
write_picture
(
s
,
data
,
linesize
);
}
static
int
xv_write_frame
(
AVFormatContext
*
s
,
int
stream_index
,
AVFrame
**
frame
,
...
...
@@ -333,7 +336,7 @@ static int xv_write_frame(AVFormatContext *s, int stream_index, AVFrame **frame,
/* xv_write_header() should have accepted only supported formats */
if
((
flags
&
AV_WRITE_UNCODED_FRAME_QUERY
))
return
0
;
return
write_picture
(
s
,
(
AVPicture
*
)
*
fram
e
);
return
write_picture
(
s
,
(
*
frame
)
->
data
,
(
*
frame
)
->
linesiz
e
);
}
static
int
xv_control_message
(
AVFormatContext
*
s
,
int
type
,
void
*
data
,
size_t
data_size
)
...
...
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