From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavformat/yop.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ffmpeg/libavformat/yop.c') diff --git a/ffmpeg/libavformat/yop.c b/ffmpeg/libavformat/yop.c index d1c0129..07086d5 100644 --- a/ffmpeg/libavformat/yop.c +++ b/ffmpeg/libavformat/yop.c @@ -69,12 +69,7 @@ static int yop_read_header(AVFormatContext *s) return AVERROR(ENOMEM); // Extra data that will be passed to the decoder - video_stream->codec->extradata_size = 8; - - video_stream->codec->extradata = av_mallocz(video_stream->codec->extradata_size + - FF_INPUT_BUFFER_PADDING_SIZE); - - if (!video_stream->codec->extradata) + if (ff_alloc_extradata(video_stream->codec, 8)) return AVERROR(ENOMEM); // Audio @@ -136,6 +131,12 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt) if (yop->video_packet.data) { *pkt = yop->video_packet; yop->video_packet.data = NULL; + yop->video_packet.buf = NULL; +#if FF_API_DESTRUCT_PACKET +FF_DISABLE_DEPRECATION_WARNINGS + yop->video_packet.destruct = NULL; +FF_ENABLE_DEPRECATION_WARNINGS +#endif yop->video_packet.size = 0; pkt->data[0] = yop->odd_frame; pkt->flags |= AV_PKT_FLAG_KEY; -- cgit v1.2.3