avviddec: reset coded_width/_height before trying to open codec
authorThiago Santos <thiago.sousa.santos@collabora.com>
Tue, 11 Jun 2013 11:24:17 +0000 (08:24 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Tue, 11 Jun 2013 12:00:49 +0000 (09:00 -0300)
commitdce9d85695d37b39c2a37b413a5b43d74c0db302
tree51526031013a276482b64b587cee6277c01ed011
parent427deb9b3401b5fc04317bf668d3cf8ceeb42d82
avviddec: reset coded_width/_height before trying to open codec

If coded_width/_height is supplied, the codec might use it as the
width/height and if it is wrong can lead to segfaults or video
corruption.

This is specially harmful on renegotiation scenarios where the
resolution changed. There seems to be no specific function for reseting
the AV Context in libav, so just set it directly.

https://bugzilla.gnome.org/show_bug.cgi?id=702003
ext/libav/gstavviddec.c