History

Support filters and decoders that dont support negative linesizes. This patch is based on work by stefano.

Originally committed as revision 26108 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer committed 15 years ago

Commit 0ccabee1 parent 9e99f844 files · +15 −6Browse files

Showing the changes to libavfilter/avfilter.c (1 of 4 files). Show all

Unified · Split

libavfilter/avfilter.c+7−4
@@ -197,12 +197,13 @@ int avfilter_config_links(AVFilterContext *filter) · 196 unmodified lines
197 197
198char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms)198char *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 perms & AV_PERM_READ ? "r" : "",201 perms & AV_PERM_READ ? "r" : "",
202 perms & AV_PERM_WRITE ? "w" : "",202 perms & AV_PERM_WRITE ? "w" : "",
203 perms & AV_PERM_PRESERVE ? "p" : "",203 perms & AV_PERM_PRESERVE ? "p" : "",
204 perms & AV_PERM_REUSE ? "u" : "",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 return buf;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 void (*start_frame)(AVFilterLink *, AVFilterBufferRef *);362 void (*start_frame)(AVFilterLink *, AVFilterBufferRef *);
362 AVFilterPad *dst = link->dstpad;363 AVFilterPad *dst = link->dstpad;
364 int perms = picref->perms;
363 365
364 FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_ref(NULL, picref, 1);366 FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_ref(NULL, picref, 1);
365 367
366 if (!(start_frame = dst->start_frame))368 if (!(start_frame = dst->start_frame))
367 start_frame = avfilter_default_start_frame;369 start_frame = avfilter_default_start_frame;
368 370
371 if (picref->linesize[0] < 0)
372 perms |= AV_PERM_NEG_LINESIZES;
369 /* prepare to copy the picture if it has insufficient permissions */373 /* prepare to copy the picture if it has insufficient permissions */
370 if ((dst->min_perms & picref->perms) != dst->min_perms ||374 if ((dst->min_perms & perms) != dst->min_perms || dst->rej_perms & perms) {
371 dst->rej_perms & picref->perms) {
372 av_log(link->dst, AV_LOG_DEBUG,375 av_log(link->dst, AV_LOG_DEBUG,
373 "frame copy needed (have perms %x, need %x, reject %x)\n",376 "frame copy needed (have perms %x, need %x, reject %x)\n",
374 picref->perms,377 picref->perms,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t