Mercurial > libavcodec.hg
comparison mpegaudiodec.c @ 7831:8195c970d077 libavcodec
Rename error_resilience to error_recognition.
author | michael |
---|---|
date | Mon, 08 Sep 2008 18:18:49 +0000 |
parents | 73b10d25cb8d |
children | 2a611af7bcbe |
comparison
equal
deleted
inserted
replaced
7830:3da762190370 | 7831:8195c970d077 |
---|---|
325 #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT) | 325 #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT) |
326 avctx->sample_fmt= SAMPLE_FMT_S32; | 326 avctx->sample_fmt= SAMPLE_FMT_S32; |
327 #else | 327 #else |
328 avctx->sample_fmt= SAMPLE_FMT_S16; | 328 avctx->sample_fmt= SAMPLE_FMT_S16; |
329 #endif | 329 #endif |
330 s->error_resilience= avctx->error_resilience; | 330 s->error_recognition= avctx->error_recognition; |
331 | 331 |
332 if(avctx->antialias_algo != FF_AA_FLOAT) | 332 if(avctx->antialias_algo != FF_AA_FLOAT) |
333 s->compute_antialias= compute_antialias_integer; | 333 s->compute_antialias= compute_antialias_integer; |
334 else | 334 else |
335 s->compute_antialias= compute_antialias_float; | 335 s->compute_antialias= compute_antialias_float; |
1563 /* some encoders generate an incorrect size for this | 1563 /* some encoders generate an incorrect size for this |
1564 part. We must go back into the data */ | 1564 part. We must go back into the data */ |
1565 s_index -= 4; | 1565 s_index -= 4; |
1566 skip_bits_long(&s->gb, last_pos - pos); | 1566 skip_bits_long(&s->gb, last_pos - pos); |
1567 av_log(s->avctx, AV_LOG_INFO, "overread, skip %d enddists: %d %d\n", last_pos - pos, end_pos-pos, end_pos2-pos); | 1567 av_log(s->avctx, AV_LOG_INFO, "overread, skip %d enddists: %d %d\n", last_pos - pos, end_pos-pos, end_pos2-pos); |
1568 if(s->error_resilience >= FF_ER_COMPLIANT) | 1568 if(s->error_recognition >= FF_ER_COMPLIANT) |
1569 s_index=0; | 1569 s_index=0; |
1570 break; | 1570 break; |
1571 } | 1571 } |
1572 // av_log(NULL, AV_LOG_ERROR, "pos2: %d %d %d %d\n", pos, end_pos, end_pos2, s_index); | 1572 // av_log(NULL, AV_LOG_ERROR, "pos2: %d %d %d %d\n", pos, end_pos, end_pos2, s_index); |
1573 switch_buffer(s, &pos, &end_pos, &end_pos2); | 1573 switch_buffer(s, &pos, &end_pos, &end_pos2); |
1600 bits_left = end_pos2 - get_bits_count(&s->gb); | 1600 bits_left = end_pos2 - get_bits_count(&s->gb); |
1601 //av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer); | 1601 //av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer); |
1602 if (bits_left < 0/* || bits_left > 500*/) { | 1602 if (bits_left < 0/* || bits_left > 500*/) { |
1603 av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left); | 1603 av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left); |
1604 s_index=0; | 1604 s_index=0; |
1605 }else if(bits_left > 0 && s->error_resilience >= FF_ER_AGGRESSIVE){ | 1605 }else if(bits_left > 0 && s->error_recognition >= FF_ER_AGGRESSIVE){ |
1606 av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left); | 1606 av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left); |
1607 s_index=0; | 1607 s_index=0; |
1608 } | 1608 } |
1609 memset(&g->sb_hybrid[s_index], 0, sizeof(*g->sb_hybrid)*(576 - s_index)); | 1609 memset(&g->sb_hybrid[s_index], 0, sizeof(*g->sb_hybrid)*(576 - s_index)); |
1610 skip_bits_long(&s->gb, bits_left); | 1610 skip_bits_long(&s->gb, bits_left); |