dec: avoid making the buffer writable
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 7 Apr 2011 10:34:51 +0000 (12:34 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 7 Apr 2011 10:34:51 +0000 (12:34 +0200)
commit6444bd2557139b80b6b9ca4e0b4856fd996b3ba1
tree84b396cd657381d17927b884eacca6a9abbd6656
parentf63d36ade8fffc4a480d4637cf6649cee3dbac77
dec: avoid making the buffer writable

Set the caps right after allocation of the buffer because we know the buffer is
writable then and we are correctly negotiated. Since ffmpeg keeps around
references to frames, making the buffer metadata writable where it was done
before pushing will always end up with a copy and that makes the sink do a slow
memcpy all the time.
ext/ffmpeg/gstffmpegdec.c