vlc | branch: master | Steve Lhomme <[email protected]> | Fri Sep 18 09:27:06 2020 +0200| [3c72b3757d024d4e041d06fa7a4e8bb543c73bdf] | committer: Steve Lhomme
mmal: deinterlace: clean code > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3c72b3757d024d4e041d06fa7a4e8bb543c73bdf --- modules/hw/mmal/deinterlace.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/hw/mmal/deinterlace.c b/modules/hw/mmal/deinterlace.c index 6cd5974d37..70a1b99e9e 100644 --- a/modules/hw/mmal/deinterlace.c +++ b/modules/hw/mmal/deinterlace.c @@ -275,17 +275,13 @@ static picture_t *deinterlace(filter_t * p_filter, picture_t * p_pic) while ((out_buf = (seq_delta(sys->seq_in, sys->seq_out) >= 5 ? mmal_queue_timedwait(sys->out_q, 1000) : mmal_queue_get(sys->out_q))) != NULL) { const unsigned int seq_out = (out_buf->flags / MMAL_BUFFER_HEADER_FLAG_USER0) & 0xf; - picture_t * out_pic; + picture_t * out_pic = di_alloc_opaque(p_filter, out_buf); - { - out_pic = di_alloc_opaque(p_filter, out_buf); - - if (out_pic == NULL) { - msg_Warn(p_filter, "Failed to alloc new filter output pic"); - mmal_queue_put_back(sys->out_q, out_buf); // Wedge buf back into Q in the hope we can alloc a pic later - out_buf = NULL; - break; - } + if (out_pic == NULL) { + msg_Warn(p_filter, "Failed to alloc new filter output pic"); + mmal_queue_put_back(sys->out_q, out_buf); // Wedge buf back into Q in the hope we can alloc a pic later + out_buf = NULL; + break; } out_buf = NULL; // Now attached to pic or recycled _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
