[FFmpeg-devel] [PATCH] matroska: Ensure sample rate is always >= 1.
Dale Curtis
dalecurtis at chromium.org
Thu Apr 19 20:15:05 CEST 2012
On Mon, Apr 16, 2012 at 6:05 PM, <dalecurtis at chromium.org> wrote:
> From: Dale Curtis <dalecurtis at chromium.org>
>
> May no longer be necessary, but seems like a valid
> enforcement.
>
> Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
> ---
> libavformat/matroskadec.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index a484c50..cdaeff7 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -1680,7 +1680,7 @@ static int matroska_read_header(AVFormatContext *s)
> }
> } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
> st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
> - st->codec->sample_rate = track->audio.out_samplerate;
> + st->codec->sample_rate = FFMAX(1,
> track->audio.out_samplerate);
> st->codec->channels = track->audio.channels;
> if (st->codec->codec_id != CODEC_ID_AAC)
> st->need_parsing = AVSTREAM_PARSE_HEADERS;
> --
> 1.7.7.3
>
>
Ping? Thanks in advance.
- dale
More information about the ffmpeg-devel
mailing list