[FFmpeg-cvslog] avformat/rtpdec_vp9: remove alloc/free functions

Michael Niedermayer git at videolan.org
Wed Feb 25 00:24:20 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 25 00:15:17 2015 +0100| [f966ac2b6e3f08c41f3c45ab5efff768db62ac5a] | committer: Michael Niedermayer

avformat/rtpdec_vp9: remove alloc/free functions

Simplify code

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f966ac2b6e3f08c41f3c45ab5efff768db62ac5a
---

 libavformat/rtpdec_vp9.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/libavformat/rtpdec_vp9.c b/libavformat/rtpdec_vp9.c
index 33f3830..b8041a9 100644
--- a/libavformat/rtpdec_vp9.c
+++ b/libavformat/rtpdec_vp9.c
@@ -31,11 +31,6 @@ struct PayloadContext {
     uint32_t     timestamp;
 };
 
-static av_cold PayloadContext *vp9_new_context(void)
-{
-    return av_mallocz(sizeof(PayloadContext));
-}
-
 static void vp9_free_dyn_buffer(AVIOContext **dyn_buf)
 {
     uint8_t *ptr_dyn_buffer;
@@ -44,11 +39,6 @@ static void vp9_free_dyn_buffer(AVIOContext **dyn_buf)
     *dyn_buf = NULL;
 }
 
-static av_cold void vp9_free_context(PayloadContext *data)
-{
-    av_free(data);
-}
-
 static av_cold int vp9_init(AVFormatContext *ctx, int st_index,
                              PayloadContext *data)
 {
@@ -311,7 +301,6 @@ RTPDynamicProtocolHandler ff_vp9_dynamic_handler = {
     .codec_type       = AVMEDIA_TYPE_VIDEO,
     .codec_id         = AV_CODEC_ID_VP9,
     .init             = vp9_init,
-    .alloc            = vp9_new_context,
-    .free             = vp9_free_context,
+    .priv_data_size   = sizeof(PayloadContext),
     .parse_packet     = vp9_handle_packet
 };



More information about the ffmpeg-cvslog mailing list