Skip to content

Commit

Permalink
Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
Browse files Browse the repository at this point in the history
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
  lavc: AV-prefix all codec flags

Conflicts:
	doc/examples/muxing.c
	ffmpeg.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/ac3enc_float.c
	libavcodec/atrac1.c
	libavcodec/atrac3.c
	libavcodec/atrac3plusdec.c
	libavcodec/dcadec.c
	libavcodec/ffv1enc.c
	libavcodec/h264.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_mb.c
	libavcodec/imc.c
	libavcodec/libmp3lame.c
	libavcodec/libtheoraenc.c
	libavcodec/libtwolame.c
	libavcodec/libvpxenc.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegaudiodec_template.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/nellymoserdec.c
	libavcodec/nellymoserenc.c
	libavcodec/nvenc.c
	libavcodec/on2avc.c
	libavcodec/options_table.h
	libavcodec/opus_celt.c
	libavcodec/pngenc.c
	libavcodec/ra288.c
	libavcodec/ratecontrol.c
	libavcodec/twinvq.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c
	libavcodec/vorbisdec.c
	libavcodec/vp3.c
	libavcodec/wma.c
	libavcodec/wmaprodec.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/me_cmp_init.c

Merged-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Jul 27, 2015
2 parents 4a2836e + 7c6eb0a commit 94d68a4
Show file tree
Hide file tree
Showing 131 changed files with 563 additions and 446 deletions.
2 changes: 1 addition & 1 deletion doc/examples/decoding_encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
}

if(codec->capabilities&CODEC_CAP_TRUNCATED)
c->flags|= CODEC_FLAG_TRUNCATED; /* we do not send complete frames */
c->flags |= AV_CODEC_FLAG_TRUNCATED; // we do not send complete frames

/* For some codecs, such as msmpeg4 and mpeg4, width and height
MUST be initialized there because this information is not
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/muxing.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static void add_stream(OutputStream *ost, AVFormatContext *oc,

/* Some formats want stream headers to be separate. */
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}

/**************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/remuxing.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int main(int argc, char **argv)
}
out_stream->codec->codec_tag = 0;
if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
out_stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
out_stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}
av_dump_format(ofmt_ctx, 0, out_filename, 1);

Expand Down
2 changes: 1 addition & 1 deletion doc/examples/transcode_aac.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static int open_output_file(const char *filename,
* Mark the encoder so that it behaves accordingly.
*/
if ((*output_format_context)->oformat->flags & AVFMT_GLOBALHEADER)
(*output_codec_context)->flags |= CODEC_FLAG_GLOBAL_HEADER;
(*output_codec_context)->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

/** Open the encoder for the audio stream to use it later. */
if ((error = avcodec_open2(*output_codec_context, output_codec, NULL)) < 0) {
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/transcoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static int open_output_file(const char *filename)
}

if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

}
av_dump_format(ofmt_ctx, 0, filename, 1);
Expand Down
12 changes: 6 additions & 6 deletions ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ static void do_video_out(AVFormatContext *s,
int got_packet, forced_keyframe = 0;
double pts_time;

if (enc->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME) &&
if (enc->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) &&
ost->top_field_first >= 0)
in_picture->top_field_first = !!ost->top_field_first;

Expand Down Expand Up @@ -1266,7 +1266,7 @@ static void do_video_stats(OutputStream *ost, int frame_size)
fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number,
ost->quality / (float)FF_QP2LAMBDA);

if (enc->coded_frame && (enc->flags&CODEC_FLAG_PSNR))
if (enc->coded_frame && (enc->flags & AV_CODEC_FLAG_PSNR))
fprintf(vstats_file, "PSNR= %6.2f ", psnr(enc->coded_frame->error[0] / (enc->width * enc->height * 255.0 * 255.0)));

fprintf(vstats_file,"f_size= %6d ", frame_size);
Expand Down Expand Up @@ -1416,8 +1416,8 @@ static void print_final_stats(int64_t total_size)
}
extra_size += ost->enc_ctx->extradata_size;
data_size += ost->data_size;
if ( (ost->enc_ctx->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2))
!= CODEC_FLAG_PASS1)
if ( (ost->enc_ctx->flags & (AV_CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2))
!= AV_CODEC_FLAG_PASS1)
pass1_used = 0;
}

Expand Down Expand Up @@ -1586,7 +1586,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%X", (int)lrintf(log2(qp_histogram[j] + 1)));
}

if ((enc->flags&CODEC_FLAG_PSNR) && (enc->coded_frame || is_last_report)) {
if ((enc->flags & AV_CODEC_FLAG_PSNR) && (enc->coded_frame || is_last_report)) {
int j;
double error, error_sum = 0;
double scale, scale_sum = 0;
Expand Down Expand Up @@ -2734,7 +2734,7 @@ static void set_encoder_id(OutputFile *of, OutputStream *ost)
if (!encoder_string)
exit_program(1);

if (!(format_flags & AVFMT_FLAG_BITEXACT) && !(codec_flags & CODEC_FLAG_BITEXACT))
if (!(format_flags & AVFMT_FLAG_BITEXACT) && !(codec_flags & AV_CODEC_FLAG_BITEXACT))
av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len);
else
av_strlcpy(encoder_string, "Lavc ", encoder_string_len);
Expand Down
2 changes: 1 addition & 1 deletion ffmpeg_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
ist->resample_height,
ist->hwaccel_retrieve_data ? ist->hwaccel_retrieved_pix_fmt : ist->resample_pix_fmt,
tb.num, tb.den, sar.num, sar.den,
SWS_BILINEAR + ((ist->dec_ctx->flags&CODEC_FLAG_BITEXACT) ? SWS_BITEXACT:0));
SWS_BILINEAR + ((ist->dec_ctx->flags&AV_CODEC_FLAG_BITEXACT) ? SWS_BITEXACT:0));
if (fr.num && fr.den)
av_bprintf(&args, ":frame_rate=%d/%d", fr.num, fr.den);
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
Expand Down
14 changes: 7 additions & 7 deletions ffmpeg_opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,15 +1220,15 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e

MATCH_PER_STREAM_OPT(qscale, dbl, qscale, oc, st);
if (qscale >= 0) {
ost->enc_ctx->flags |= CODEC_FLAG_QSCALE;
ost->enc_ctx->flags |= AV_CODEC_FLAG_QSCALE;
ost->enc_ctx->global_quality = FF_QP2LAMBDA * qscale;
}

MATCH_PER_STREAM_OPT(disposition, str, ost->disposition, oc, st);
ost->disposition = av_strdup(ost->disposition);

if (oc->oformat->flags & AVFMT_GLOBALHEADER)
ost->enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
ost->enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

av_opt_get_int(o->g->sws_opts, "sws_flags", 0, &ost->sws_flags);

Expand Down Expand Up @@ -1450,17 +1450,17 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
video_enc->rc_override_count = i;

if (do_psnr)
video_enc->flags|= CODEC_FLAG_PSNR;
video_enc->flags|= AV_CODEC_FLAG_PSNR;

/* two pass mode */
MATCH_PER_STREAM_OPT(pass, i, do_pass, oc, st);
if (do_pass) {
if (do_pass & 1) {
video_enc->flags |= CODEC_FLAG_PASS1;
video_enc->flags |= AV_CODEC_FLAG_PASS1;
av_dict_set(&ost->encoder_opts, "flags", "+pass1", AV_DICT_APPEND);
}
if (do_pass & 2) {
video_enc->flags |= CODEC_FLAG_PASS2;
video_enc->flags |= AV_CODEC_FLAG_PASS2;
av_dict_set(&ost->encoder_opts, "flags", "+pass2", AV_DICT_APPEND);
}
}
Expand All @@ -1481,7 +1481,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
if (!strcmp(ost->enc->name, "libx264")) {
av_dict_set(&ost->encoder_opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE);
} else {
if (video_enc->flags & CODEC_FLAG_PASS2) {
if (video_enc->flags & AV_CODEC_FLAG_PASS2) {
char *logbuffer = read_file(logfilename);

if (!logbuffer) {
Expand All @@ -1491,7 +1491,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
}
video_enc->stats_in = logbuffer;
}
if (video_enc->flags & CODEC_FLAG_PASS1) {
if (video_enc->flags & AV_CODEC_FLAG_PASS1) {
f = av_fopen_utf8(logfilename, "wb");
if (!f) {
av_log(NULL, AV_LOG_FATAL,
Expand Down
3 changes: 2 additions & 1 deletion ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,8 @@ static int stream_component_open(VideoState *is, int stream_index)
av_codec_set_lowres(avctx, stream_lowres);

if(stream_lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
if (fast) avctx->flags2 |= CODEC_FLAG2_FAST;
if (fast)
avctx->flags2 |= AV_CODEC_FLAG2_FAST;
if(codec->capabilities & CODEC_CAP_DR1)
avctx->flags |= CODEC_FLAG_EMU_EDGE;

Expand Down
2 changes: 1 addition & 1 deletion libavcodec/4xm.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static inline void idct_put(FourXContext *f, int x, int y)
idct(block[i]);
}

if (!(f->avctx->flags & CODEC_FLAG_GRAY)) {
if (!(f->avctx->flags & AV_CODEC_FLAG_GRAY)) {
for (i = 4; i < 6; i++)
idct(block[i]);
}
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/aacdec_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,9 +1129,9 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
AAC_RENAME(ff_aac_sbr_init)();

#if USE_FIXED
ac->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & CODEC_FLAG_BITEXACT);
ac->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT);
#else
ac->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
ac->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
#endif /* USE_FIXED */
if (!ac->fdsp) {
return AVERROR(ENOMEM);
Expand Down
6 changes: 3 additions & 3 deletions libavcodec/aacenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,

init_put_bits(&s->pb, avpkt->data, avpkt->size);

if ((avctx->frame_number & 0xFF)==1 && !(avctx->flags & CODEC_FLAG_BITEXACT))
if ((avctx->frame_number & 0xFF)==1 && !(avctx->flags & AV_CODEC_FLAG_BITEXACT))
put_bitstream_info(s, LIBAVCODEC_IDENT);
start_ch = 0;
memset(chan_el_counter, 0, sizeof(chan_el_counter));
Expand Down Expand Up @@ -757,7 +757,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
avctx->frame_bits = put_bits_count(&s->pb);

// rate control stuff
if (!(avctx->flags & CODEC_FLAG_QSCALE)) {
if (!(avctx->flags & AV_CODEC_FLAG_QSCALE)) {
float ratio = avctx->bit_rate * 1024.0f / avctx->sample_rate / avctx->frame_bits;
s->lambda *= ratio;
s->lambda = FFMIN(s->lambda, 65536.f);
Expand Down Expand Up @@ -794,7 +794,7 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
{
int ret = 0;

s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);

Expand Down
2 changes: 1 addition & 1 deletion libavcodec/aacpsy.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static av_cold void lame_window_init(AacPsyContext *ctx, AVCodecContext *avctx)
for (i = 0; i < avctx->channels; i++) {
AacPsyChannel *pch = &ctx->ch[i];

if (avctx->flags & CODEC_FLAG_QSCALE)
if (avctx->flags & AV_CODEC_FLAG_QSCALE)
pch->attack_threshold = psy_vbr_map[avctx->global_quality / FF_QP2LAMBDA].st_lrm;
else
pch->attack_threshold = lame_calc_attack_threshold(avctx->bit_rate / avctx->channels / 1000);
Expand Down
6 changes: 3 additions & 3 deletions libavcodec/ac3dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
ff_bswapdsp_init(&s->bdsp);

#if (USE_FIXED)
s->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & CODEC_FLAG_BITEXACT);
s->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT);
#else
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_fmt_convert_init(&s->fmt_conv, avctx);
#endif

ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
av_lfg_init(&s->dith_state, 0);

if (USE_FIXED)
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/ac3enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2484,7 +2484,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)

ff_audiodsp_init(&s->adsp);
ff_me_cmp_init(&s->mecc, avctx);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);

dprint_options(s);

Expand Down
2 changes: 1 addition & 1 deletion libavcodec/ac3enc_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
{
AC3EncodeContext *s = avctx->priv_data;
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
return ff_ac3_encode_init(avctx);
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/arm/idctdsp_init_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx,
int cpu_flags = av_get_cpu_flags();

if (!avctx->lowres && !high_bit_depth) {
if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & CODEC_FLAG_BITEXACT)) ||
if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & AV_CODEC_FLAG_BITEXACT)) ||
avctx->idct_algo == FF_IDCT_ARM) {
c->idct_put = j_rev_dct_arm_put;
c->idct_add = j_rev_dct_arm_add;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/arm/idctdsp_init_armv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ av_cold void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
{
if (!avctx->lowres && !high_bit_depth) {
if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & CODEC_FLAG_BITEXACT)) ||
if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & AV_CODEC_FLAG_BITEXACT)) ||
avctx->idct_algo == FF_IDCT_SIMPLEARMV6) {
c->idct_put = ff_simple_idct_put_armv6;
c->idct_add = ff_simple_idct_add_armv6;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/ass.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
"\r\n"
"[Events]\r\n"
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n",
!(avctx->flags & CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "",
!(avctx->flags & AV_CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "",
ASS_DEFAULT_PLAYRESX, ASS_DEFAULT_PLAYRESY,
font, font_size, color, color, back_color, back_color,
-bold, -italic, -underline, alignment);
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/asvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static inline void idct_put(ASV1Context *a, AVFrame *frame, int mb_x, int mb_y)
a->idsp.idct_put(dest_y + 8 * linesize, linesize, block[2]);
a->idsp.idct_put(dest_y + 8 * linesize + 8, linesize, block[3]);

if (!(a->avctx->flags & CODEC_FLAG_GRAY)) {
if (!(a->avctx->flags & AV_CODEC_FLAG_GRAY)) {
a->idsp.idct_put(dest_cb, frame->linesize[1], block[4]);
a->idsp.idct_put(dest_cr, frame->linesize[2], block[5]);
}
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/asvenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static inline void dct_get(ASV1Context *a, const AVFrame *frame,
for (i = 0; i < 4; i++)
a->fdsp.fdct(block[i]);

if (!(a->avctx->flags & CODEC_FLAG_GRAY)) {
if (!(a->avctx->flags & AV_CODEC_FLAG_GRAY)) {
a->pdsp.get_pixels(block[4], ptr_cb, frame->linesize[1]);
a->pdsp.get_pixels(block[5], ptr_cr, frame->linesize[2]);
for (i = 4; i < 6; i++)
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/atrac1.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)

ff_atrac_generate_tables();

q->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
q->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);

q->bands[0] = q->low;
q->bands[1] = q->mid;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/atrac3.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
}

ff_atrac_init_gain_compensation(&q->gainc_ctx, 4, 3);
q->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
q->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);

q->units = av_mallocz_array(avctx->channels, sizeof(*q->units));
if (!q->units || !q->fdsp) {
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/atrac3plusdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static av_cold int atrac3p_decode_init(AVCodecContext *avctx)
ctx->my_channel_layout = avctx->channel_layout;

ctx->ch_units = av_mallocz_array(ctx->num_channel_blocks, sizeof(*ctx->ch_units));
ctx->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
ctx->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);

if (!ctx->ch_units || !ctx->fdsp) {
atrac3p_decode_close(avctx);
Expand Down
Loading

0 comments on commit 94d68a4

Please sign in to comment.