Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Side by Side Diff: third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/aac.c

Issue 335018: ffmpeg patch to patch 42 to avoid infinite loop (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * AAC decoder 2 * AAC decoder
3 * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org ) 3 * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org )
4 * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com ) 4 * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com )
5 * 5 *
6 * This file is part of FFmpeg. 6 * This file is part of FFmpeg.
7 * 7 *
8 * FFmpeg is free software; you can redistribute it and/or 8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 uint8_t sect_len = k; 634 uint8_t sect_len = k;
635 int sect_len_incr; 635 int sect_len_incr;
636 int sect_band_type = get_bits(gb, 4); 636 int sect_band_type = get_bits(gb, 4);
637 if (sect_band_type == 12) { 637 if (sect_band_type == 12) {
638 av_log(ac->avccontext, AV_LOG_ERROR, "invalid band type\n"); 638 av_log(ac->avccontext, AV_LOG_ERROR, "invalid band type\n");
639 return -1; 639 return -1;
640 } 640 }
641 while ((sect_len_incr = get_bits(gb, bits)) == (1 << bits)-1) 641 while ((sect_len_incr = get_bits(gb, bits)) == (1 << bits)-1)
642 sect_len += sect_len_incr; 642 sect_len += sect_len_incr;
643 sect_len += sect_len_incr; 643 sect_len += sect_len_incr;
644 if (sect_len > ics->max_sfb || sect_len == 0) { 644 if (sect_len > ics->max_sfb || sect_len == k) {
645 av_log(ac->avccontext, AV_LOG_ERROR, 645 av_log(ac->avccontext, AV_LOG_ERROR,
646 "Number of bands (%d) is invalid, limit (%d).\n", 646 "Number of bands (%d) is invalid, limit (%d).\n",
647 sect_len, ics->max_sfb); 647 sect_len, ics->max_sfb);
648 return -1; 648 return -1;
649 } 649 }
650 for (; k < sect_len; k++) { 650 for (; k < sect_len; k++) {
651 band_type [idx] = sect_band_type; 651 band_type [idx] = sect_band_type;
652 band_type_run_end[idx++] = sect_len; 652 band_type_run_end[idx++] = sect_len;
653 } 653 }
654 } 654 }
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 CODEC_TYPE_AUDIO, 1732 CODEC_TYPE_AUDIO,
1733 CODEC_ID_AAC, 1733 CODEC_ID_AAC,
1734 sizeof(AACContext), 1734 sizeof(AACContext),
1735 aac_decode_init, 1735 aac_decode_init,
1736 NULL, 1736 NULL,
1737 aac_decode_close, 1737 aac_decode_close,
1738 aac_decode_frame, 1738 aac_decode_frame,
1739 .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"), 1739 .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
1740 .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, 1740 .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
1741 }; 1741 };
OLDNEW
« no previous file with comments | « third_party/ffmpeg/README.chromium ('k') | third_party/ffmpeg/patches/to_upstream/48_aac_infinite_loop.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698