diff options
author | Martin Storsjö <martin@martin.st> | 2015-02-24 13:37:03 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-02-24 23:07:44 +0200 |
commit | 199fb40278146c5bb162990c66ad3cd561abc780 (patch) | |
tree | 0411eef55863c799202a17254b8cc30e9601d28f /libavformat/rtpdec_h263_rfc2190.c | |
parent | 8a273a746061a112e5e35066a8fd8e146d821a62 (diff) |
rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_h263_rfc2190.c')
-rw-r--r-- | libavformat/rtpdec_h263_rfc2190.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libavformat/rtpdec_h263_rfc2190.c b/libavformat/rtpdec_h263_rfc2190.c index e45778108b..f0794c7c94 100644 --- a/libavformat/rtpdec_h263_rfc2190.c +++ b/libavformat/rtpdec_h263_rfc2190.c @@ -26,6 +26,7 @@ */ #include "avformat.h" +#include "avio_internal.h" #include "rtpdec_formats.h" #include "libavutil/attributes.h" #include "libavutil/intreadwrite.h" @@ -41,11 +42,7 @@ struct PayloadContext { static void h263_free_context(PayloadContext *data) { - if (data->buf) { - uint8_t *p; - avio_close_dyn_buf(data->buf, &p); - av_free(p); - } + ffio_free_dyn_buf(&data->buf); } static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, @@ -63,10 +60,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, if (data->buf && data->timestamp != *timestamp) { /* Dropping old buffered, unfinished data */ - uint8_t *p; - avio_close_dyn_buf(data->buf, &p); - av_free(p); - data->buf = NULL; + ffio_free_dyn_buf(&data->buf); data->endbyte_bits = 0; } |