Revision 727c7aa0

View differences:

libavformat/avio.c
212 212
{
213 213
    return h->max_packet_size;
214 214
}
215
void url_get_filename(URLContext *h, char *buf, int buf_size)
216
{
217
    av_strlcpy(buf, h->filename, buf_size);
218
}
215 219
#endif
216 220

  
217 221
#define URL_SCHEME_CHARS                        \
......
372 376
    return h->prot->url_get_file_handle(h);
373 377
}
374 378

  
375
void url_get_filename(URLContext *h, char *buf, int buf_size)
376
{
377
    av_strlcpy(buf, h->filename, buf_size);
378
}
379

  
380

  
381 379
static int default_interrupt_cb(void)
382 380
{
383 381
    return 0;
libavformat/avio.h
113 113
attribute_deprecated int64_t url_filesize(URLContext *h);
114 114
attribute_deprecated int url_get_file_handle(URLContext *h);
115 115
attribute_deprecated int url_get_max_packet_size(URLContext *h);
116
attribute_deprecated void url_get_filename(URLContext *h, char *buf, int buf_size);
116 117
#endif
117 118

  
118 119
/**
......
122 123
int url_exist(const char *url);
123 124

  
124 125
/**
125
 * Copy the filename of the resource accessed by h to buf.
126
 *
127
 * @param buf_size size in bytes of buf
128
 */
129
void url_get_filename(URLContext *h, char *buf, int buf_size);
130

  
131
/**
132 126
 * The callback is called in blocking functions to test regulary if
133 127
 * asynchronous interruption is needed. AVERROR_EXIT is returned
134 128
 * in this case by the interrupted function. 'NULL' means no interrupt

Also available in: Unified diff