784ab15589
Test av_video_hint_alloc with 0, 1, and 4 rects, and av_video_hint_create_side_data. Verifies that av_video_hint_rects and av_video_hint_get_rect return pointers consistent with rect_offset and rect_size, write/read-back of rect coordinates, both hint type values, and OOM paths via av_max_alloc. Coverage for libavutil/video_hint.c: 0.00% -> 82.05% The remaining uncovered lines are the nb_rects overflow guard and the av_buffer_create / av_frame_new_side_data_from_buf failure cleanup paths, which av_max_alloc() cannot reach since it forces the first allocation to fail.
22 lines
458 B
Plaintext
22 lines
458 B
Plaintext
Testing av_video_hint_alloc()
|
|
alloc 0: OK, nb_rects=0, size>0=yes
|
|
alloc 1: OK, nb_rects=1, size>0=yes
|
|
alloc 4: OK, nb_rects=4, size>0=yes
|
|
|
|
Testing av_video_hint_get_rect()
|
|
rect 0: x=0 y=0 w=64 h=48
|
|
rect 1: x=100 y=200 w=65 h=49
|
|
rect 2: x=200 y=400 w=66 h=50
|
|
|
|
Testing type field
|
|
constant: type=0
|
|
changed: type=1
|
|
|
|
Testing av_video_hint_create_side_data()
|
|
side_data: OK, nb_rects=2
|
|
side_data rect 0: x=10 y=20
|
|
|
|
Testing OOM paths
|
|
alloc OOM: OK
|
|
side_data OOM: OK
|