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
7b4e1466
Commit
7b4e1466
authored
Feb 27, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exit ffmpeg if swr_convert() fails.
parent
a4c22e3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
ffmpeg.c
ffmpeg.c
+4
-0
swresample.h
libswresample/swresample.h
+1
-1
No files found.
ffmpeg.c
View file @
7b4e1466
...
...
@@ -1267,6 +1267,10 @@ need_realloc:
buftmp
=
audio_buf
;
size_out
=
swr_convert
(
ost
->
swr
,
(
uint8_t
*
[]){
buftmp
},
audio_buf_size
/
(
enc
->
channels
*
osize
),
(
const
uint8_t
*
[]){
buf
},
size
/
(
dec
->
channels
*
isize
));
if
(
size_out
<
0
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"swr_convert failed
\n
"
);
exit_program
(
1
);
}
size_out
=
size_out
*
enc
->
channels
*
osize
;
}
else
{
buftmp
=
buf
;
...
...
libswresample/swresample.h
View file @
7b4e1466
...
...
@@ -106,7 +106,7 @@ void swr_free(struct SwrContext **s);
* @param in input buffers, only the first one need to be set in case of packed audio
* @param in_count number of input samples available in one channel
*
* @return number of samples output per channel
* @return number of samples output per channel
, negative value on error
*/
int
swr_convert
(
struct
SwrContext
*
s
,
uint8_t
*
out
[
SWR_CH_MAX
],
int
out_count
,
const
uint8_t
*
in
[
SWR_CH_MAX
],
int
in_count
);
...
...
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