~ppsspp/ppsspp/ffmpeg-upstream

« back to all changes in this revision

Viewing changes to libavcodec/wmavoice.c

  • Committer: Sérgio Benjamim
  • Date: 2015-07-20 03:55:05 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20150720035505-i1jj1zcjcnd0mc7w
Updated to 2.7.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1982
1982
                    *got_frame_ptr) {
1983
1983
                    cnt += s->spillover_nbits;
1984
1984
                    s->skip_bits_next = cnt & 7;
1985
 
                    return cnt >> 3;
 
1985
                    res = cnt >> 3;
 
1986
                    if (res > avpkt->size) {
 
1987
                        av_log(ctx, AV_LOG_ERROR,
 
1988
                               "Trying to skip %d bytes in packet of size %d\n",
 
1989
                               res, avpkt->size);
 
1990
                        return AVERROR_INVALIDDATA;
 
1991
                    }
 
1992
                    return res;
1986
1993
                } else
1987
1994
                    skip_bits_long (gb, s->spillover_nbits - cnt +
1988
1995
                                    get_bits_count(gb)); // resync
2001
2008
    } else if (*got_frame_ptr) {
2002
2009
        int cnt = get_bits_count(gb);
2003
2010
        s->skip_bits_next = cnt & 7;
2004
 
        return cnt >> 3;
 
2011
        res = cnt >> 3;
 
2012
        if (res > avpkt->size) {
 
2013
            av_log(ctx, AV_LOG_ERROR,
 
2014
                   "Trying to skip %d bytes in packet of size %d\n",
 
2015
                   res, avpkt->size);
 
2016
            return AVERROR_INVALIDDATA;
 
2017
        }
 
2018
        return res;
2005
2019
    } else if ((s->sframe_cache_size = pos) > 0) {
2006
2020
        /* rewind bit reader to start of last (incomplete) superframe... */
2007
2021
        init_get_bits(gb, avpkt->data, size << 3);