diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-09-03 19:31:03 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-09-03 19:31:03 +0000 |
commit | e00c3de8210c39ab99b3c7aee3e0199ccdbf4c6b (patch) | |
tree | 0db69882e6b964bb65c3497d84909dc05a35ab0f | |
parent | c3b1325158c9dc04198c7c1b35fd745bdf787dd8 (diff) | |
download | ffmpeg-e00c3de8210c39ab99b3c7aee3e0199ccdbf4c6b.tar.gz |
forbid mp3 < 16000hz in anything except mov
Originally committed as revision 15189 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/movenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index ab7e02c73b..a58c343496 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1610,6 +1610,12 @@ static int mov_write_header(AVFormatContext *s) }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; + } } } |