summaryrefslogtreecommitdiff
path: root/ffmpeg/libavformat/yop.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavformat/yop.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavformat/yop.c')
-rw-r--r--ffmpeg/libavformat/yop.c13
1 files changed, 7 insertions, 6 deletions
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;