aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_dv.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_dv.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_dv.c')
-rw-r--r--libavformat/rtpdec_dv.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavformat/rtpdec_dv.c b/libavformat/rtpdec_dv.c
index 3a7e14159b..43cd3cdeac 100644
--- a/libavformat/rtpdec_dv.c
+++ b/libavformat/rtpdec_dv.c
@@ -23,6 +23,7 @@
#include "libavcodec/bytestream.h"
+#include "avio_internal.h"
#include "rtpdec_formats.h"
struct PayloadContext {
@@ -31,17 +32,9 @@ struct PayloadContext {
int bundled_audio;
};
-static void dv_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 dv_free_context(PayloadContext *data)
{
- dv_free_dyn_buffer(&data->buf);
+ ffio_free_dyn_buf(&data->buf);
}
static av_cold int dv_sdp_parse_fmtp_config(AVFormatContext *s,
@@ -104,7 +97,7 @@ static int dv_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_dv_ctx,
/* drop data of previous packets in case of non-continuous (lossy) packet stream */
if (rtp_dv_ctx->buf && rtp_dv_ctx->timestamp != *timestamp) {
- dv_free_dyn_buffer(&rtp_dv_ctx->buf);
+ ffio_free_dyn_buf(&rtp_dv_ctx->buf);
}
/* sanity check for size of input packet: 1 byte payload at least */