Browse Source

lavc: Fix use of uninitialized field.

Fixes CID732297
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 12 years ago
parent
commit
e0909ff158
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      libavcodec/utils.c

+ 8
- 4
libavcodec/utils.c View File

@@ -1753,10 +1753,14 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
/* many decoders assign whole AVFrames, thus overwriting extended_data;
* make sure it's set correctly; assume decoders that actually use
* extended_data are doing it correctly */
planar = av_sample_fmt_is_planar(frame->format);
channels = av_get_channel_layout_nb_channels(frame->channel_layout);
if (!(planar && channels > AV_NUM_DATA_POINTERS))
frame->extended_data = frame->data;
if (*got_frame_ptr) {
planar = av_sample_fmt_is_planar(frame->format);
channels = av_get_channel_layout_nb_channels(frame->channel_layout);
if (!(planar && channels > AV_NUM_DATA_POINTERS))
frame->extended_data = frame->data;
} else {
frame->extended_data = NULL;
}

return ret;
}


Loading…
Cancel
Save