[FFmpeg-devel] [PATCH] matroska: Ensure sample rate is always >= 1.

Michael Niedermayer michaelni at gmx.at
Thu Apr 19 22:31:11 CEST 2012


On Mon, Apr 16, 2012 at 06:05:27PM -0700, 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);

What does or did this fix ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120419/28080e1c/attachment.asc>


More information about the ffmpeg-devel mailing list