Commit d0ab71ed authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  asfdec: cosmetics, reformat ff_asf_parse_packet()
  g.723.1: add missing CODEC_CAP_DR1
  avconv: remove now unneeded calls to avcodec_get_frame_defaults().
  lavc: initialize output AVFrame before decoding.

Conflicts:
	libavformat/asfdec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 719fde47 292a08cb
......@@ -1422,8 +1422,6 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
return AVERROR(ENOMEM);
else
avcodec_get_frame_defaults(ist->decoded_frame);
decoded_frame = ist->decoded_frame;
update_benchmark(NULL);
......@@ -1545,8 +1543,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
return AVERROR(ENOMEM);
else
avcodec_get_frame_defaults(ist->decoded_frame);
decoded_frame = ist->decoded_frame;
pkt->dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ist->st->time_base);
......
......@@ -1643,6 +1643,8 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
if ((avctx->coded_width || avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
return AVERROR(EINVAL);
avcodec_get_frame_defaults(picture);
if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type & FF_THREAD_FRAME)) {
int did_split = av_packet_split_side_data(&tmp);
apply_param_change(avctx, &tmp);
......@@ -1759,6 +1761,8 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
return AVERROR(EINVAL);
}
avcodec_get_frame_defaults(frame);
if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size) {
uint8_t *side;
int side_size;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment