comparison faac.c @ 1826:5fb6572ca817 libavcodec

av_log patch by ("Steven M. Schultz" <sms at 2BSD dot COM>)
author michael
date Mon, 23 Feb 2004 16:07:30 +0000
parents 726a81d83ddd
children bceeca1bb30f
comparison
equal deleted inserted replaced
1825:231a6c19e28f 1826:5fb6572ca817
44 &samples_input, &max_bytes_output); 44 &samples_input, &max_bytes_output);
45 45
46 /* check faac version */ 46 /* check faac version */
47 faac_cfg = faacEncGetCurrentConfiguration(s->faac_handle); 47 faac_cfg = faacEncGetCurrentConfiguration(s->faac_handle);
48 if (faac_cfg->version != FAAC_CFG_VERSION) { 48 if (faac_cfg->version != FAAC_CFG_VERSION) {
49 fprintf(stderr, "wrong libfaac version (compiled for: %d, using %d)\n", 49 av_log(avctx, AV_LOG_ERROR, "wrong libfaac version (compiled for: %d, using %d)\n", FAAC_CFG_VERSION, faac_cfg->version);
50 FAAC_CFG_VERSION, faac_cfg->version );
51 faacEncClose(s->faac_handle); 50 faacEncClose(s->faac_handle);
52 return -1; 51 return -1;
53 } 52 }
54 53
55 /* put the options in the configuration struct */ 54 /* put the options in the configuration struct */
60 faac_cfg->bitRate = avctx->bit_rate; 59 faac_cfg->bitRate = avctx->bit_rate;
61 faac_cfg->outputFormat = 0; 60 faac_cfg->outputFormat = 0;
62 faac_cfg->inputFormat = FAAC_INPUT_16BIT; 61 faac_cfg->inputFormat = FAAC_INPUT_16BIT;
63 62
64 if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) { 63 if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) {
65 fprintf(stderr, "libfaac doesn't support this output format!\n"); 64 av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n");
66 return -1; 65 return -1;
67 } 66 }
68 67
69 avctx->frame_size = samples_input / avctx->channels; 68 avctx->frame_size = samples_input / avctx->channels;
70 69