Instead of crashing, return from ff_vdpau_mpeg_picture_complete()
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 18 Feb 2009 09:21:29 +0000 (09:21 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Wed, 18 Feb 2009 09:21:29 +0000 (09:21 +0000)
if get_buffer() failed.

Patch by Reimar

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

libavcodec/vdpau.c

index e222bdf..1645d25 100644 (file)
@@ -184,6 +184,8 @@ void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf,
     struct vdpau_render_state *render, *last, *next;
     int i;
 
+    if (!s->current_picture_ptr) return;
+
     render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
     assert(render);