[SCM] libav/experimental: Allow the lowres option to affect audio codecs, too

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:15:37 UTC 2013


The following commit has been merged in the experimental branch:
commit 535cb0434db078488579eea5865045b13ae1516d
Author: Martin Storsjö <martin at martin.st>
Date:   Fri Sep 10 06:19:31 2010 +0000

    Allow the lowres option to affect audio codecs, too
    
    Originally committed as revision 25094 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 0577996..5e459c4 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -333,7 +333,7 @@ static const AVOption options[]={
 {"aac_ltp", NULL, 0, FF_OPT_TYPE_CONST, FF_PROFILE_AAC_LTP, INT_MIN, INT_MAX, A|E, "profile"},
 {"level", NULL, OFFSET(level), FF_OPT_TYPE_INT, FF_LEVEL_UNKNOWN, INT_MIN, INT_MAX, V|A|E, "level"},
 {"unknown", NULL, 0, FF_OPT_TYPE_CONST, FF_LEVEL_UNKNOWN, INT_MIN, INT_MAX, V|A|E, "level"},
-{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), FF_OPT_TYPE_INT, 0, 0, INT_MAX, V|D},
+{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), FF_OPT_TYPE_INT, 0, 0, INT_MAX, V|A|D},
 {"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
 {"skip_factor", "frame skip factor", OFFSET(frame_skip_factor), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
 {"skip_exp", "frame skip exponent", OFFSET(frame_skip_exp), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 067c213..442b9ef 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -505,8 +505,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
     }
     avctx->frame_number = 0;
     if(avctx->codec->init){
-        if(avctx->codec_type == AVMEDIA_TYPE_VIDEO &&
-           avctx->codec->max_lowres < avctx->lowres){
+        if (avctx->codec->max_lowres < avctx->lowres) {
             av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n",
                    avctx->codec->max_lowres);
             goto free_and_end;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list