Merge commit 'd7f530b0d67fe3996dbfa990a47c865e0d1400a2'

* commit 'd7f530b0d67fe3996dbfa990a47c865e0d1400a2':
  aviobuf: check context before using it

See: 7441d1ec33
Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/87/merge
Michael Niedermayer 10 years ago
commit 36552345d0
  1. 2
      libavformat/aviobuf.c

@ -1097,7 +1097,6 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
*pbuffer = NULL;
return 0;
}
d = s->opaque;
/* don't attempt to pad fixed-size packet buffers */
if (!s->max_packet_size) {
@ -1107,6 +1106,7 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
avio_flush(s);
d = s->opaque;
*pbuffer = d->buffer;
size = d->size;
av_free(d);

Loading…
Cancel
Save