OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49125ae
)
ffplay: error out with invalid sample rate or channels.
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 3 Jun 2011 22:16:12 +0000
(
00:16
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 3 Jun 2011 22:16:12 +0000
(
00:16
+0200)
Fixes Ticket119
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffplay.c
patch
|
blob
|
history
diff --git
a/ffplay.c
b/ffplay.c
index
5997f65
..
4139afb
100644
(file)
--- a/
ffplay.c
+++ b/
ffplay.c
@@
-2158,6
+2158,10
@@
static int stream_component_open(VideoState *is, int stream_index)
/* prepare audio output */
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
+ if(avctx->sample_rate <= 0 || avctx->channels <= 0){
+ fprintf(stderr, "Invalid sample rate or channel count\n");
+ return -1;
+ }
wanted_spec.freq = avctx->sample_rate;
wanted_spec.format = AUDIO_S16SYS;
wanted_spec.channels = avctx->channels;