Mercurial > libavcodec.hg
comparison aacdec.c @ 11903:f3e007b379e5 libavcodec
aacdec: Factorize if (elem_type < TYPE_DSE).
author | alexc |
---|---|
date | Mon, 21 Jun 2010 04:07:19 +0000 |
parents | c883aa4aa616 |
children | 09a48810ded6 |
comparison
equal
deleted
inserted
replaced
11902:c883aa4aa616 | 11903:f3e007b379e5 |
---|---|
2004 memset(ac->tags_seen_this_frame, 0, sizeof(ac->tags_seen_this_frame)); | 2004 memset(ac->tags_seen_this_frame, 0, sizeof(ac->tags_seen_this_frame)); |
2005 // parse | 2005 // parse |
2006 while ((elem_type = get_bits(&gb, 3)) != TYPE_END) { | 2006 while ((elem_type = get_bits(&gb, 3)) != TYPE_END) { |
2007 elem_id = get_bits(&gb, 4); | 2007 elem_id = get_bits(&gb, 4); |
2008 | 2008 |
2009 if (elem_type < TYPE_DSE && !(che=get_che(ac, elem_type, elem_id))) { | 2009 if (elem_type < TYPE_DSE) { |
2010 if (!(che=get_che(ac, elem_type, elem_id))) { | |
2010 av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n", elem_type, elem_id); | 2011 av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n", elem_type, elem_id); |
2011 return -1; | 2012 return -1; |
2012 } | 2013 } |
2013 | |
2014 if (elem_type < TYPE_DSE) | |
2015 samples = 1024; | 2014 samples = 1024; |
2015 } | |
2016 | 2016 |
2017 switch (elem_type) { | 2017 switch (elem_type) { |
2018 | 2018 |
2019 case TYPE_SCE: | 2019 case TYPE_SCE: |
2020 err = decode_ics(ac, &che->ch[0], &gb, 0, 0); | 2020 err = decode_ics(ac, &che->ch[0], &gb, 0, 0); |