Commit ec203cd6 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e671d3ad'

* commit 'e671d3ad':
  h264: do not copy ref count/ref2frm when updating per-frame context
  flvdec: Check the return value of a malloc

Conflicts:
	libavformat/flvdec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 973dc110 e671d3ad
......@@ -1644,8 +1644,6 @@ static int decode_update_thread_context(AVCodecContext *dst,
copy_fields(h, h1, poc_lsb, redundant_pic_count);
// reference lists
copy_fields(h, h1, ref_count, list_count);
copy_fields(h, h1, ref2frm, intra_gb);
copy_fields(h, h1, short_ref, cabac_init_idc);
copy_picture_range(h->short_ref, h1->short_ref, 32, h, h1);
......
......@@ -212,10 +212,14 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_co
vcodec->codec_id = AV_CODEC_ID_VP6A;
if (read) {
if (vcodec->extradata_size != 1) {
vcodec->extradata_size = 1;
vcodec->extradata = av_malloc(1 + FF_INPUT_BUFFER_PADDING_SIZE);
if (vcodec->extradata)
vcodec->extradata_size = 1;
}
vcodec->extradata[0] = avio_r8(s->pb);
if (vcodec->extradata)
vcodec->extradata[0] = avio_r8(s->pb);
else
avio_skip(s->pb, 1);
}
return 1; // 1 byte body size adjustment for flv_read_packet()
case FLV_CODECID_H264:
......
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