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
a38cdfde
Commit
a38cdfde
authored
Apr 26, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vsrc_buffer: Set output size
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ad0193bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
ffmpeg.c
ffmpeg.c
+1
-1
vsrc_buffer.c
libavfilter/vsrc_buffer.c
+6
-1
No files found.
ffmpeg.c
View file @
a38cdfde
...
...
@@ -1638,7 +1638,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
av_vsrc_buffer_add_frame2
(
ost
->
input_video_filter
,
&
picture
,
ist
->
pts
,
sar
,
ist
->
st
->
codec
->
width
,
ist
->
st
->
codec
->
height
,
ist
->
st
->
codec
->
pix_fmt
,
"
0:0
"
);
//TODO user setable params
ist
->
st
->
codec
->
pix_fmt
,
""
);
//TODO user setable params
}
}
}
...
...
libavfilter/vsrc_buffer.c
View file @
a38cdfde
...
...
@@ -35,6 +35,7 @@ typedef struct {
enum
PixelFormat
pix_fmt
;
AVRational
time_base
;
///< time_base to set in the output link
AVRational
pixel_aspect
;
char
sws_param
[
256
];
}
BufferSourceContext
;
int
av_vsrc_buffer_add_frame2
(
AVFilterContext
*
buffer_filter
,
AVFrame
*
frame
,
...
...
@@ -53,6 +54,10 @@ int av_vsrc_buffer_add_frame2(AVFilterContext *buffer_filter, AVFrame *frame,
//return -1;
}
if
(
!
c
->
sws_param
[
0
]){
snprintf
(
c
->
sws_param
,
255
,
"%d:%d:%s"
,
c
->
w
,
c
->
h
,
sws_param
);
}
if
(
width
!=
c
->
w
||
height
!=
c
->
h
||
pix_fmt
!=
c
->
pix_fmt
){
AVFilterContext
*
scale
=
buffer_filter
->
outputs
[
0
]
->
dst
;
AVFilterLink
*
link
;
...
...
@@ -67,7 +72,7 @@ int av_vsrc_buffer_add_frame2(AVFilterContext *buffer_filter, AVFrame *frame,
if
(
avfilter_open
(
&
scale
,
f
,
"Input equalizer"
)
<
0
)
return
-
1
;
if
((
ret
=
avfilter_init_filter
(
scale
,
sws_param
,
NULL
))
<
0
){
if
((
ret
=
avfilter_init_filter
(
scale
,
c
->
sws_param
,
NULL
))
<
0
){
avfilter_free
(
scale
);
return
ret
;
}
...
...
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