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

Unified Diff: source/patched-ffmpeg-mt/libavcodec/aacdec.c

Issue 2850032: ffmpeg update to june 23 version which fixes mp4 crash on still frames with 3... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/Makefile ('k') | source/patched-ffmpeg-mt/libavcodec/aacsbr.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/patched-ffmpeg-mt/libavcodec/aacdec.c
===================================================================
--- source/patched-ffmpeg-mt/libavcodec/aacdec.c (revision 50820)
+++ source/patched-ffmpeg-mt/libavcodec/aacdec.c (working copy)
@@ -67,7 +67,7 @@
* Y (not in this code) Layer-2
* Y (not in this code) Layer-3
* N SinuSoidal Coding (Transient, Sinusoid, Noise)
- * N (planned) Parametric Stereo
+ * Y Parametric Stereo
* N Direct Stream Transfer
*
* Note: - HE AAC v1 comprises LC AAC with Spectral Band Replication.
@@ -200,7 +200,8 @@
ff_aac_sbr_ctx_init(&ac->che[type][id]->sbr);
if (type != TYPE_CCE) {
ac->output_data[(*channels)++] = ac->che[type][id]->ch[0].ret;
- if (type == TYPE_CPE) {
+ if (type == TYPE_CPE ||
+ (type == TYPE_SCE && ac->m4ac.ps == 1)) {
ac->output_data[(*channels)++] = ac->che[type][id]->ch[1].ret;
}
}
@@ -228,6 +229,7 @@
AVCodecContext *avctx = ac->avctx;
int i, type, channels = 0, ret;
+ if (new_che_pos != che_pos)
memcpy(che_pos, new_che_pos, 4 * MAX_ELEM_ID * sizeof(new_che_pos[0][0]));
if (channel_config) {
@@ -472,6 +474,8 @@
av_log(ac->avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index);
return -1;
}
+ if (ac->m4ac.sbr == 1 && ac->m4ac.ps == -1)
+ ac->m4ac.ps = 1;
skip_bits_long(&gb, i);
@@ -1668,6 +1672,10 @@
av_log(ac->avctx, AV_LOG_ERROR, "Implicit SBR was found with a first occurrence after the first frame.\n");
skip_bits_long(gb, 8 * cnt - 4);
return res;
+ } else if (ac->m4ac.ps == -1 && ac->output_configured < OC_LOCKED && ac->avctx->channels == 1) {
+ ac->m4ac.sbr = 1;
+ ac->m4ac.ps = 1;
+ output_configure(ac, ac->che_pos, ac->che_pos, ac->m4ac.chan_config, ac->output_configured);
} else {
ac->m4ac.sbr = 1;
}
@@ -1947,8 +1955,10 @@
} else if (ac->output_configured != OC_LOCKED) {
ac->output_configured = OC_NONE;
}
- if (ac->output_configured != OC_LOCKED)
+ if (ac->output_configured != OC_LOCKED) {
ac->m4ac.sbr = -1;
+ ac->m4ac.ps = -1;
+ }
ac->m4ac.sample_rate = hdr_info.sample_rate;
ac->m4ac.sampling_index = hdr_info.sampling_index;
ac->m4ac.object_type = hdr_info.object_type;
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/Makefile ('k') | source/patched-ffmpeg-mt/libavcodec/aacsbr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698