Originally committed as revision 26108 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/avfilter.c (1 of 4 files). Show all
Unified · Split
| @@ -197,12 +197,13 @@ int avfilter_config_links(AVFilterContext *filter) · 196 unmodified lines | ||
| 197 | 197 | |
| 198 | 198 | char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) |
| 199 | 199 | { |
| 200 | − snprintf(buf, buf_size, "%s%s%s%s%s", | |
| 200 | + snprintf(buf, buf_size, "%s%s%s%s%s%s", | |
| 201 | 201 | perms & AV_PERM_READ ? "r" : "", |
| 202 | 202 | perms & AV_PERM_WRITE ? "w" : "", |
| 203 | 203 | perms & AV_PERM_PRESERVE ? "p" : "", |
| 204 | 204 | perms & AV_PERM_REUSE ? "u" : "", |
| 205 | − perms & AV_PERM_REUSE2 ? "U" : ""); | |
| 205 | + perms & AV_PERM_REUSE2 ? "U" : "", | |
| 206 | + perms & AV_PERM_NEG_LINESIZES ? "n" : ""); | |
| 206 | 207 | return buf; |
| 207 | 208 | } |
| 208 | 209 | |
| @@ -360,15 +361,17 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) · 151 unmodified lines | ||
| 360 | 361 | { |
| 361 | 362 | void (*start_frame)(AVFilterLink *, AVFilterBufferRef *); |
| 362 | 363 | AVFilterPad *dst = link->dstpad; |
| 364 | + int perms = picref->perms; | |
| 363 | 365 | |
| 364 | 366 | FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_ref(NULL, picref, 1); |
| 365 | 367 | |
| 366 | 368 | if (!(start_frame = dst->start_frame)) |
| 367 | 369 | start_frame = avfilter_default_start_frame; |
| 368 | 370 | |
| 371 | + if (picref->linesize[0] < 0) | |
| 372 | + perms |= AV_PERM_NEG_LINESIZES; | |
| 369 | 373 | /* prepare to copy the picture if it has insufficient permissions */ |
| 370 | − if ((dst->min_perms & picref->perms) != dst->min_perms || | |
| 371 | − dst->rej_perms & picref->perms) { | |
| 374 | + if ((dst->min_perms & perms) != dst->min_perms || dst->rej_perms & perms) { | |
| 372 | 375 | av_log(link->dst, AV_LOG_DEBUG, |
| 373 | 376 | "frame copy needed (have perms %x, need %x, reject %x)\n", |
| 374 | 377 | picref->perms, |