From ca9c5a4d3768b986da537b16530906d3a553e881 Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Fri, 29 Aug 2008 22:13:22 +0000 Subject: [PATCH] make has_codec_parameters not returning true when sample_fmt is not set Originally committed as revision 15043 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index ee6a71e..c4ebf20 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1842,7 +1842,7 @@ static int has_codec_parameters(AVCodecContext *enc) int val; switch(enc->codec_type) { case CODEC_TYPE_AUDIO: - val = enc->sample_rate && enc->channels; + val = enc->sample_rate && enc->channels && enc->sample_fmt != SAMPLE_FMT_NONE; if(!enc->frame_size && (enc->codec_id == CODEC_ID_VORBIS || enc->codec_id == CODEC_ID_AAC)) -- 2.7.4