| @@ -191,11 +191,23 @@ int avfilter_config_links(AVFilterContext *filter) · 190 unmodified lines |
| 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,7 +245,9 @@ AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int · 31 unmodified lines |
| 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); |