summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_asf.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_asf.c
parent8a273a746061a112e5e35066a8fd8e146d821a62 (diff)
rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_asf.c')
-rw-r--r--libavformat/rtpdec_asf.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index b0a50353fd..7eb720b3c4 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -213,10 +213,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
* multiple RTP packets.
*/
if (asf->pktbuf && len_off != avio_tell(asf->pktbuf)) {
- uint8_t *p;
- avio_close_dyn_buf(asf->pktbuf, &p);
- asf->pktbuf = NULL;
- av_free(p);
+ ffio_free_dyn_buf(&asf->pktbuf);
}
if (!len_off && !asf->pktbuf &&
(res = avio_open_dyn_buf(&asf->pktbuf)) < 0)
@@ -279,12 +276,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
static void asfrtp_free_context(PayloadContext *asf)
{
- if (asf->pktbuf) {
- uint8_t *p = NULL;
- avio_close_dyn_buf(asf->pktbuf, &p);
- asf->pktbuf = NULL;
- av_free(p);
- }
+ ffio_free_dyn_buf(&asf->pktbuf);
av_freep(&asf->buf);
av_free(asf);
}