Skip to content

Commit

Permalink
avio: deprecate url_close_buf
Browse files Browse the repository at this point in the history
It's not used anywhere and its return value looks broken.

Signed-off-by: Ronald S. Bultje <[email protected]>
  • Loading branch information
elenril authored and rbultje committed Mar 17, 2011
1 parent 83fddae commit 35f1023
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libavformat/avio.h
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,10 @@ URLContext *url_fileno(AVIOContext *s);
attribute_deprecated int url_fget_max_packet_size(AVIOContext *s);

attribute_deprecated int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags);
#endif

/** return the written or read size */
int url_close_buf(AVIOContext *s);
attribute_deprecated int url_close_buf(AVIOContext *s);
#endif

/**
* Open a write only memory stream.
Expand Down
2 changes: 1 addition & 1 deletion libavformat/aviobuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,13 +1010,13 @@ int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags)
av_freep(s);
return ret;
}
#endif

int url_close_buf(AVIOContext *s)
{
put_flush_packet(s);
return s->buf_ptr - s->buffer;
}
#endif

/* output in a dynamic buffer */

Expand Down

0 comments on commit 35f1023

Please sign in to comment.