diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-25 02:03:52 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-25 02:03:52 +0300 |
commit | d52bf89d21b744344cf6cda1bfe156786f24772a (patch) | |
tree | 25cfd43e57273d606a09be92a020650f16f206c6 /libavformat/rtpdec_vp8.c | |
parent | 99c76902cdc3f815d58ba16ccfc83e75acec1f4a (diff) | |
parent | 78791c086bcaf9eb084c27555b31fea8bbb7624a (diff) |
Merge commit '78791c086bcaf9eb084c27555b31fea8bbb7624a'
* commit '78791c086bcaf9eb084c27555b31fea8bbb7624a':
rtpdec: Use .init instead of .alloc to set default values
Conflicts:
libavformat/rdt.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_vp8.c')
-rw-r--r-- | libavformat/rtpdec_vp8.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c index e756bf45bc..fca2295b0e 100644 --- a/libavformat/rtpdec_vp8.c +++ b/libavformat/rtpdec_vp8.c @@ -269,13 +269,10 @@ static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8, return AVERROR(EAGAIN); } -static PayloadContext *vp8_new_context(void) +static av_cold int vp8_init(AVFormatContext *s, int st_index, PayloadContext *vp8) { - PayloadContext *vp8 = av_mallocz(sizeof(PayloadContext)); - if (!vp8) - return NULL; vp8->sequence_ok = 1; - return vp8; + return 0; } static void vp8_free_context(PayloadContext *vp8) @@ -293,7 +290,8 @@ RTPDynamicProtocolHandler ff_vp8_dynamic_handler = { .enc_name = "VP8", .codec_type = AVMEDIA_TYPE_VIDEO, .codec_id = AV_CODEC_ID_VP8, - .alloc = vp8_new_context, + .priv_data_size = sizeof(PayloadContext), + .init = vp8_init, .free = vp8_free_context, .parse_packet = vp8_handle_packet, .need_keyframe = vp8_need_keyframe, |