Mercurial > libavformat.hg
changeset 3886:d3a8d137ba1f libavformat
forbid mp3 < 16000hz in anything except mov
author | bcoudurier |
---|---|
date | Wed, 03 Sep 2008 19:31:03 +0000 |
parents | 4d5d454fae45 |
children | c8ab0676bba6 |
files | movenc.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/movenc.c Wed Sep 03 19:23:24 2008 +0000 +++ b/movenc.c Wed Sep 03 19:31:03 2008 +0000 @@ -1610,6 +1610,12 @@ }else{ track->sampleSize = (av_get_bits_per_sample(st->codec->codec_id) >> 3) * st->codec->channels; } + if(track->mode != MODE_MOV && + track->enc->codec_id == CODEC_ID_MP3 && track->enc->sample_rate < 16000){ + av_log(s, AV_LOG_ERROR, "track %d: muxing mp3 at %dhz is not supported\n", + i, track->enc->sample_rate); + return -1; + } } }