==1502== Memcheck, a memory error detector
==1502== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==1502== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==1502== Command: ./vaapi_test 10
==1502== 
0:00:07.967783547  1502     0x18800aa0 ERROR       vaapivideomemory gstvaapivideomemory.c:736:gst_video_info_update_from_surface: Cannot create a VA derived image from surface 0x194ddc40
0:00:11.190299365  1502      0x9bf0360 ERROR       vaapivideomemory gstvaapivideomemory.c:736:gst_video_info_update_from_surface: Cannot create a VA derived image from surface 0x9c627e0
0:00:14.644887130  1502      0x9de7240 ERROR       vaapivideomemory gstvaapivideomemory.c:736:gst_video_info_update_from_surface: Cannot create a VA derived image from surface 0xa150500
0:00:18.226907736  1502      0xa222d30 ERROR       vaapivideomemory gstvaapivideomemory.c:736:gst_video_info_update_from_surface: Cannot create a VA derived image from surface 0xa231d40
0:00:22.293185360  1502     0x17a51d60 ERROR       vaapivideomemory gstvaapivideomemory.c:736:gst_video_info_update_from_surface: Cannot create a VA derived image from surface 0x18822bb0
0:00:23.399460224  1502      0x9df9be0 ERROR       vaapivideomemory gstvaapivideomemory.c:736:gst_video_info_update_from_surface: Cannot create a VA derived image from surface 0xa09a340
==1502== Thread 17 videotestsrc4:sr:
==1502== Invalid read of size 8
==1502==    at 0xE811E6D: vlVaEndPicture (picture.c:596)
==1502==    by 0xAE6FEAE: vaEndPicture (in /usr/lib/x86_64-linux-gnu/libva.so.1.4000.0)
==1502==    by 0xA5D4038: gst_vaapi_enc_picture_encode (gstvaapiencoder_objects.c:581)
==1502==    by 0xA5CDF07: gst_vaapi_encoder_h264_encode (gstvaapiencoder_h264.c:2581)
==1502==    by 0xA5C49C8: gst_vaapi_encoder_put_frame (gstvaapiencoder.c:407)
==1502==    by 0xA595EC9: gst_vaapiencode_handle_frame (gstvaapiencode.c:643)
==1502==    by 0x8294C1E: gst_video_encoder_chain (gstvideoencoder.c:1438)
==1502==    by 0x555AF51: gst_pad_chain_data_unchecked (gstpad.c:4205)
==1502==    by 0x555AF51: gst_pad_push_data (gstpad.c:4457)
==1502==    by 0x55633E1: gst_pad_push (gstpad.c:4576)
==1502==    by 0x6E111F9: gst_base_transform_chain (gstbasetransform.c:2312)
==1502==    by 0x555AF51: gst_pad_chain_data_unchecked (gstpad.c:4205)
==1502==    by 0x555AF51: gst_pad_push_data (gstpad.c:4457)
==1502==    by 0x55633E1: gst_pad_push (gstpad.c:4576)
==1502==  Address 0x18 is not stack'd, malloc'd or (recently) free'd
==1502== 
==1502== 
==1502== Process terminating with default action of signal 11 (SIGSEGV)
==1502==  Access not within mapped region at address 0x18
==1502==    at 0xE811E6D: vlVaEndPicture (picture.c:596)
==1502==    by 0xAE6FEAE: vaEndPicture (in /usr/lib/x86_64-linux-gnu/libva.so.1.4000.0)
==1502==    by 0xA5D4038: gst_vaapi_enc_picture_encode (gstvaapiencoder_objects.c:581)
==1502==    by 0xA5CDF07: gst_vaapi_encoder_h264_encode (gstvaapiencoder_h264.c:2581)
==1502==    by 0xA5C49C8: gst_vaapi_encoder_put_frame (gstvaapiencoder.c:407)
==1502==    by 0xA595EC9: gst_vaapiencode_handle_frame (gstvaapiencode.c:643)
==1502==    by 0x8294C1E: gst_video_encoder_chain (gstvideoencoder.c:1438)
==1502==    by 0x555AF51: gst_pad_chain_data_unchecked (gstpad.c:4205)
==1502==    by 0x555AF51: gst_pad_push_data (gstpad.c:4457)
==1502==    by 0x55633E1: gst_pad_push (gstpad.c:4576)
==1502==    by 0x6E111F9: gst_base_transform_chain (gstbasetransform.c:2312)
==1502==    by 0x555AF51: gst_pad_chain_data_unchecked (gstpad.c:4205)
==1502==    by 0x555AF51: gst_pad_push_data (gstpad.c:4457)
==1502==    by 0x55633E1: gst_pad_push (gstpad.c:4576)
==1502==  If you believe this happened as a result of a stack
==1502==  overflow in your program's main thread (unlikely but
==1502==  possible), you can try to increase the size of the
==1502==  main thread stack using the --main-stacksize= flag.
==1502==  The main thread stack size used in this run was 8388608.
==1502== 
==1502== HEAP SUMMARY:
==1502==     in use at exit: 57,797,109 bytes in 28,695 blocks
==1502==   total heap usage: 72,607 allocs, 43,912 frees, 102,762,694 bytes allocated
==1502== 
==1502== LEAK SUMMARY:
==1502==    definitely lost: 320 bytes in 10 blocks
==1502==    indirectly lost: 3,680 bytes in 160 blocks
==1502==      possibly lost: 38,148 bytes in 62 blocks
==1502==    still reachable: 55,960,653 bytes in 8,228 blocks
==1502==                       of which reachable via heuristic:
==1502==                         length64           : 632 bytes in 14 blocks
==1502==                         newarray           : 1,648 bytes in 23 blocks
==1502==         suppressed: 1,577,124 bytes in 19,511 blocks
==1502== Rerun with --leak-check=full to see details of leaked memory
==1502== 
==1502== For counts of detected and suppressed errors, rerun with: -v
==1502== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault

