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
f29c28a8
Commit
f29c28a8
authored
Mar 16, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/buffersrc: check channel count changes.
parent
3cd34263
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
buffersrc.c
libavfilter/buffersrc.c
+3
-3
No files found.
libavfilter/buffersrc.c
View file @
f29c28a8
...
...
@@ -68,9 +68,9 @@ typedef struct {
av_log(s, AV_LOG_INFO, "Changing frame properties on the fly is not supported by all filters.\n");\
}
#define CHECK_AUDIO_PARAM_CHANGE(s, c, srate, ch_layout, format)\
#define CHECK_AUDIO_PARAM_CHANGE(s, c, srate, ch_layout,
ch_count,
format)\
if (c->sample_fmt != format || c->sample_rate != srate ||\
c->channel_layout != ch_layout) {\
c->channel_layout != ch_layout
|| c->channels != ch_count
) {\
av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\
return AVERROR(EINVAL);\
}
...
...
@@ -138,7 +138,7 @@ static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *
if
(
!
frame
->
channel_layout
)
frame
->
channel_layout
=
s
->
channel_layout
;
CHECK_AUDIO_PARAM_CHANGE
(
ctx
,
s
,
frame
->
sample_rate
,
frame
->
channel_layout
,
frame
->
format
);
av_frame_get_channels
(
frame
),
frame
->
format
);
break
;
default:
return
AVERROR
(
EINVAL
);
...
...
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