aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_h261.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-25 00:40:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-25 00:42:14 +0100
commit7d9b06eb179fb0d032c530d21182dce3fe0a7671 (patch)
tree7be8a4aaa2ed84b83b868f4f636c3a27dfe7b98c /libavformat/rtpdec_h261.c
parent6e9bbaca6c6739e6524809d3e786ce1e10ad518b (diff)
parent199fb40278146c5bb162990c66ad3cd561abc780 (diff)
downloadffmpeg-7d9b06eb179fb0d032c530d21182dce3fe0a7671.tar.gz
Merge commit '199fb40278146c5bb162990c66ad3cd561abc780'
* commit '199fb40278146c5bb162990c66ad3cd561abc780': rtpdec: Use ffio_free_dyn_buf Conflicts: libavformat/rtpdec_latm.c libavformat/rtpdec_svq3.c libavformat/rtpdec_xiph.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_h261.c')
-rw-r--r--libavformat/rtpdec_h261.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/libavformat/rtpdec_h261.c b/libavformat/rtpdec_h261.c
index 2f562bb579..787f1d0dd8 100644
--- a/libavformat/rtpdec_h261.c
+++ b/libavformat/rtpdec_h261.c
@@ -21,6 +21,7 @@
#include "libavcodec/get_bits.h"
#include "avformat.h"
+#include "avio_internal.h"
#include "rtpdec_formats.h"
#define RTP_H261_PAYLOAD_HEADER_SIZE 4
@@ -32,14 +33,6 @@ struct PayloadContext {
uint32_t timestamp;
};
-static void h261_free_dyn_buffer(AVIOContext **dyn_buf)
-{
- uint8_t *ptr_dyn_buffer;
- avio_close_dyn_buf(*dyn_buf, &ptr_dyn_buffer);
- av_free(ptr_dyn_buffer);
- *dyn_buf = NULL;
-}
-
static av_cold void h261_free_context(PayloadContext *pl_ctx)
{
/* return if context is invalid */
@@ -47,9 +40,7 @@ static av_cold void h261_free_context(PayloadContext *pl_ctx)
return;
/* free buffer if it is valid */
- if (pl_ctx->buf) {
- h261_free_dyn_buffer(&pl_ctx->buf);
- }
+ ffio_free_dyn_buf(&pl_ctx->buf);
}
static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx,
@@ -62,7 +53,7 @@ static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx
/* drop data of previous packets in case of non-continuous (lossy) packet stream */
if (rtp_h261_ctx->buf && rtp_h261_ctx->timestamp != *timestamp) {
- h261_free_dyn_buffer(&rtp_h261_ctx->buf);
+ ffio_free_dyn_buf(&rtp_h261_ctx->buf);
rtp_h261_ctx->endbyte_bits = 0;
}