Revision eedca998

View differences:

libavfilter/avfilter.c
191 191
    return 0;
192 192
}
193 193

  
194
char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms)
195
{
196
    snprintf(buf, buf_size, "%s%s%s%s%s",
197
             perms & AV_PERM_READ      ? "r" : "",
198
             perms & AV_PERM_WRITE     ? "w" : "",
199
             perms & AV_PERM_PRESERVE  ? "p" : "",
200
             perms & AV_PERM_REUSE     ? "r" : "",
201
             perms & AV_PERM_REUSE2    ? "R" : "");
202
    return buf;
203
}
204

  
194 205
void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end)
195 206
{
207
    av_unused char buf[16];
196 208
    dprintf(ctx,
197
            "ref[%p buf:%p refcount:%d perms:0x%x data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64,
198
            ref, ref->buf, ref->buf->refcount, ref->perms, ref->data[0],
209
            "ref[%p buf:%p refcount:%d perms:%s data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64,
210
            ref, ref->buf, ref->buf->refcount, ff_get_ref_perms_string(buf, sizeof(buf), ref->perms), ref->data[0],
199 211
            ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3],
200 212
            ref->pts, ref->pos);
201 213

  
......
233 245
{
234 246
    AVFilterBufferRef *ret = NULL;
235 247

  
236
    FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\n", perms, w, h);
248
    av_unused char buf[16];
249
    FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0);
250
    dprintf(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
237 251

  
238 252
    if (link_dpad(link).get_video_buffer)
239 253
        ret = link_dpad(link).get_video_buffer(link, perms, w, h);
libavfilter/avfilter.h
26 26

  
27 27
#define LIBAVFILTER_VERSION_MAJOR  1
28 28
#define LIBAVFILTER_VERSION_MINOR 38
29
#define LIBAVFILTER_VERSION_MICRO  0
29
#define LIBAVFILTER_VERSION_MICRO  1
30 30

  
31 31
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
32 32
                                               LIBAVFILTER_VERSION_MINOR, \
libavfilter/internal.h
28 28

  
29 29
void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end);
30 30

  
31
char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms);
32

  
31 33
void ff_dprintf_link(void *ctx, AVFilterLink *link, int end);
32 34

  
33 35
#define FF_DPRINTF_START(ctx, func) dprintf(NULL, "%-16s: ", #func)

Also available in: Unified diff