56 uint8_t md5[16], buf[64];
61 for (i = 0; i <
sizeof(md5); i++)
62 snprintf(buf + i*2, 3,
"%02x", md5[i]);
75 if (fwrite(buf, 1, i*2+1, stdout) < i*2+1)
memory handling functions
int ffurl_write(URLContext *h, const unsigned char *buf, int size)
Write size bytes from buf to the resource accessed by h.
AVIOInterruptCB interrupt_callback
#define AVIO_FLAG_WRITE
write-only
static int md5_write(URLContext *h, const unsigned char *buf, int size)
void av_md5_update(AVMD5 *ctx, const uint8_t *src, const int len)
void av_log(void *avcl, int level, const char *fmt,...)
static int md5_open(URLContext *h, const char *filename, int flags)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_md5_init(AVMD5 *ctx)
static int md5_close(URLContext *h)
void av_md5_final(AVMD5 *ctx, uint8_t *dst)
URLProtocol ff_md5_protocol
int ffurl_close(URLContext *h)
Close the resource accessed by the URLContext h, and free the memory used by it.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
int ffurl_open(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options)
Create an URLContext for accessing to the resource indicated by url, and open it. ...
char * filename
specified URL
unbuffered private I/O API