Skip to content

Commit dea1a87

Browse files
JET fixes (#436)
1 parent a40e40c commit dea1a87

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

src/avframe_transfer.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,4 +362,4 @@ function transfer_img_buf_to_frame!(frame, img::AbstractArray{RGB{N6f10}}, scanl
362362
end
363363

364364
# Fallback
365-
transfer_img_buf_to_frame!(frame, img, scanline_major) = _unsuported_append_encode_type()
365+
transfer_img_buf_to_frame!(frame, img, scanline_major) = _unsupported_append_encode_type()

src/avio.jl

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ stash_graph_input(r, align = VIO_ALIGN) = stash_graph_input!(Vector{UInt8}(undef
501501

502502
function unpack_stashed_planes!(r::VideoReader, imgbuf)
503503
frame = graph_input_frame(r)
504-
av_make_writable(frame)
504+
av_frame_make_writable(frame)
505505
av_image_fill_arrays(
506506
frame,
507507
frame.linesize,
@@ -523,6 +523,7 @@ function decode(r::VideoReader, packet)
523523
push!(r.frame_queue, stash_graph_input(r))
524524
remove_graph_input!(r)
525525
end
526+
pret = 0
526527
if !r.flush
527528
pret = avcodec_send_packet(r.codec_context, packet)
528529
check_send_packet_return(pret)
@@ -643,7 +644,7 @@ end
643644
function retrieve(r::VideoReader{TRANSCODE}) # true=transcode
644645
pix_fmt = out_frame_format(r)
645646
if !is_pixel_type_supported(pix_fmt)
646-
unsupported_retrieveal_format(pix_fmt)
647+
unsupported_retrieval_format(pix_fmt)
647648
end
648649
elt = VIO_PIX_FMT_DEF_ELTYPE_LU[pix_fmt]
649650
width, height = out_frame_size(r)
@@ -1116,14 +1117,20 @@ function get_camera_devices(idev, idev_name)
11161117

11171118
if read_vid_devs
11181119
m = match(r"""\[.*"(.*)".?""", line)
1119-
if m != nothing
1120-
push!(camera_devices, m.captures[1])
1120+
if m !== nothing
1121+
cap = m.captures[1]
1122+
if cap !== nothing
1123+
push!(camera_devices, cap)
1124+
end
11211125
end
11221126

11231127
# Alternative format (TODO: could be combined with the regex above)
11241128
m = match(r"""\[.*\] \[[0-9]\] (.*)""", line)
1125-
if m != nothing
1126-
push!(camera_devices, m.captures[1])
1129+
if m !== nothing
1130+
cap = m.captures[1]
1131+
if cap !== nothing
1132+
push!(camera_devices, cap)
1133+
end
11271134
end
11281135
end
11291136
end

src/frame_graph.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ end
279279

280280
function pix_fmt_to_bits_per_pixel(pix_fmt)
281281
fmt_desc = av_pix_fmt_desc_get(pix_fmt)
282-
check_ptr_valid(fmt_desc, false) || error("Unknown pixel format $dst_pix_fmt")
282+
check_ptr_valid(fmt_desc, false) || error("Unknown pixel format $pix_fmt")
283283
padded_bits = av_get_padded_bits_per_pixel(fmt_desc)
284284
bits = av_get_bits_per_pixel(fmt_desc)
285285
return bits, padded_bits

0 commit comments

Comments
 (0)