[vlc-commits] qsv: don't encode a NULL picture
Steve Lhomme
git at videolan.org
Wed Apr 4 18:28:31 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Sep 19 12:52:31 2017 +0200| [5f808bca69ae291c03725478d1a385833b82bf60] | committer: Steve Lhomme
qsv: don't encode a NULL picture
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f808bca69ae291c03725478d1a385833b82bf60
---
modules/codec/qsv.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
index d368afe392..939975f510 100644
--- a/modules/codec/qsv.c
+++ b/modules/codec/qsv.c
@@ -836,9 +836,12 @@ static block_t *Encode(encoder_t *this, picture_t *pic)
async_task_t *task;
block_t *block = NULL;
- task = encode_frame( enc, pic );
- if (likely(task != NULL))
- async_task_t_fifo_Put(&sys->packets, task);
+ if (likely(pic != NULL))
+ {
+ task = encode_frame( enc, pic );
+ if (likely(task != NULL))
+ async_task_t_fifo_Put(&sys->packets, task);
+ }
if ( async_task_t_fifo_GetCount(&sys->packets) == sys->async_depth ||
(!pic && async_task_t_fifo_GetCount(&sys->packets)))
More information about the vlc-commits
mailing list