[FFmpeg-cvslog] r15043 - trunk/libavformat/utils.c

Ronald S. Bultje rsbultje
Sat Aug 30 00:27:46 CEST 2008


On Fri, Aug 29, 2008 at 6:13 PM, bcoudurier <subversion at mplayerhq.hu> wrote:
> make has_codec_parameters not returning true when sample_fmt is not set
> @@ -1842,7 +1842,7 @@ static int has_codec_parameters(AVCodecC
>     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))

Doesn't this mean, since s_fmt is codec-dependent (and can thus only
be set by the codec) that we always have to open the codec and that
demuxer header parsing is never sufficient to pass find_stream_info()?
If so, I would guess that this is bad.

(In practice, the reason I think it's bad is because in things like
MMS and RTSP, not all streams are actually opened and that means that
find_stream_info() will hang in practice if the stream header does is
not sufficient to pass find_stream_info().)


More information about the ffmpeg-cvslog mailing list