summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_dv.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-24 13:37:03 +0200
committerMartin Storsjö <martin@martin.st>2015-02-24 23:07:44 +0200
commit199fb40278146c5bb162990c66ad3cd561abc780 (patch)
tree0411eef55863c799202a17254b8cc30e9601d28f /libavformat/rtpdec_dv.c
parent8a273a746061a112e5e35066a8fd8e146d821a62 (diff)
rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
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 c428322097..72d06f75f8 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 */