aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_jpeg.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-23 22:18:32 +0200
committerMartin Storsjö <martin@martin.st>2015-02-24 16:24:19 +0200
commit5d8cae45737bed6239bd6b6e0698802dbe1463c8 (patch)
treed7f5c2316c6d71136cde6d31da2bd2f491362560 /libavformat/rtpdec_jpeg.c
parente72605f80bf5cbe32053a554ccc137e0a99cf3dd (diff)
downloadffmpeg-5d8cae45737bed6239bd6b6e0698802dbe1463c8.tar.gz
rtpdec: Get rid of all trivial .alloc/.free functions
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_jpeg.c')
-rw-r--r--libavformat/rtpdec_jpeg.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index caa1bd2815..68ce6d8c8e 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -59,11 +59,6 @@ static const uint8_t default_quantizers[128] = {
99, 99, 99, 99, 99, 99, 99, 99
};
-static PayloadContext *jpeg_new_context(void)
-{
- return av_mallocz(sizeof(PayloadContext));
-}
-
static inline void free_frame(PayloadContext *jpeg)
{
if (jpeg->frame) {
@@ -385,7 +380,7 @@ RTPDynamicProtocolHandler ff_jpeg_dynamic_handler = {
.enc_name = "JPEG",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_MJPEG,
- .alloc = jpeg_new_context,
+ .priv_data_size = sizeof(PayloadContext),
.free = jpeg_free_context,
.parse_packet = jpeg_parse_packet,
.static_payload_id = 26,