ncplayer -L with an image aborts
running ncplayer -b foo -L ../data/aidsrobots.jpeg triggers an assert(), apparently from within libav:
[schwarzgerat](134) $ valgrind --tool=memcheck ./ncplayer -b sex -L ../data/aidsrobots.jpeg
==3660550== Memcheck, a memory error detector
==3660550== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==3660550== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==3660550== Command: ./ncplayer -b sex -L ../data/aidsrobots.jpeg
==3660550==
==3660550==
==3660550== Process terminating with default action of signal 6 (SIGABRT): dumping core
==3660550== at 0x4C41C8C: __pthread_kill_implementation (pthread_kill.c:44)
==3660550== by 0x4BEDC41: raise (raise.c:26)
==3660550== by 0x4BD64EF: abort (abort.c:79)
==3660550== by 0x68E8E34: ??? (in /usr/local/lib/libswscale.so.8.13.100)
==3660550== by 0x68EA907: sws_setColorspaceDetails (in /usr/local/lib/libswscale.so.8.13.100)
==3660550== by 0x6888258: ??? (in /usr/local/lib/libswscale.so.8.13.100)
==3660550== by 0x6889F9D: ??? (in /usr/local/lib/libswscale.so.8.13.100)
==3660550== by 0x4DA6536: ffmpeg_resize_internal (ffmpeg.c:595)
==3660550== by 0x4DA6686: ffmpeg_blit (ffmpeg.c:657)
==3660550== by 0x48B8887: ncvisual_blit_internal (visual.c:88)
==3660550== by 0x48BAFD3: ncvisual_render_cells (visual.c:1027)
==3660550== by 0x48BB7F6: ncvisual_blit (visual.c:1194)
==3660550==
==3660550== HEAP SUMMARY:
==3660550== in use at exit: 6,269,046 bytes in 4,297 blocks
==3660550== total heap usage: 5,239 allocs, 942 frees, 7,992,368 bytes allocated
==3660550==
==3660550== LEAK SUMMARY:
==3660550== definitely lost: 0 bytes in 0 blocks
==3660550== indirectly lost: 0 bytes in 0 blocks
==3660550== possibly lost: 839 bytes in 5 blocks
==3660550== still reachable: 6,268,207 bytes in 4,292 blocks
==3660550== suppressed: 0 bytes in 0 blocks
==3660550== Rerun with --leak-check=full to see details of leaked memory
==3660550==
==3660550== For lists of detected and suppressed errors, rerun with: -s
==3660550== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Aborted (core dumped)
[schwarzgerat](134) $
i suspect this to be due to libav changes. let me compile against an older one and see what happens. either way, we'll want to fix/work around this.
i'm seeing:
[mjpeg @ 0x55dece520840] marker=da avail_size_in_buf=25605
[mjpeg @ 0x55dece520840] component: 1
[mjpeg @ 0x55dece520840] marker parser used 25542 bytes (204333 bits)
[mjpeg @ 0x55dece520840] marker=d9 avail_size_in_buf=0
[mjpeg @ 0x55dece520840] decode frame unused 0 bytes
[swscaler @ 0x55dece55ed80] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x55dece55ed80] Forcing full internal H chroma due to input having non subsampled chroma
ncplane_new_internal:692:created new 74x132 plane "play" @ 0x0
ncplane_erase:2466:erasing 74x132 plane
ncplane_erase:2466:erasing 74x132 plane
ncvisual_geom_inner:279:vis 0x0+0x0 0x7fa085656040
ncvisual_geom_inner:447:rgeom: 74 132 222 264 @ 0/0 (4 on 0x55dece578bf0)
ncvisual_blit:1143:inblit 480x600 2@2 0x0 @ 0x0 0x55dece578bf0
ncvisual_geom_inner:279:vis 0x0+0x0 0x7fa085656040
ncvisual_geom_inner:447:rgeom: 74 132 222 264 @ 0/0 (4 on 0x55dece578bf0)
ncvisual_blit:1192:blit to plane 0x55dece578bf0 at 0/0 geom 74x132
ncvisual_render_cells:1017:cblit: rows/cols: 74x132 plane: 74/132 pix: 222/264
[swscaler @ 0x55dece5add40] Forcing full internal H chroma due to input having non subsampled chroma
ncplane_erase:2466:erasing 74x132 plane
engorge_crender_vector:1556:resizing rvec (0) for 0x55dece4f3e60 to 9768
notcurses_rasterize_inner:1276:pile 0x55dece4f3e60 ymax: 74 xmax: 132
notcurses_rasterize_inner:1282:sprixel phase 1
notcurses_rasterize_inner:1287:glyph phase 1
notcurses_rasterize_inner:1291:sprixel phase 2
notcurses_rasterize_inner:1300:glyph phase 2
^[[1G^[[38;2;128;192;128m^[[48;2;80;71;64mf^[[48;2;81;72;65mram^[[48;2;80;72;65me^[[48;2;81;73;66m ^[[48;2;81;74;66m0000^[[48;2;80;7
ncplane_erase:2466:erasing 74x132 plane
ncvisual_geom_inner:279:vis 0x0+0x0 0x7fa085656040
ncvisual_geom_inner:447:rgeom: 74 132 222 264 @ 0/0 (4 on 0x55dece578bf0)
ncvisual_blit:1143:inblit 480x600 2@2 0x0 @ 0x0 0x55dece578bf0
ncvisual_geom_inner:279:vis 0x0+0x0 0x7fa085656040
ncvisual_geom_inner:447:rgeom: 74 132 222 264 @ 0/0 (4 on 0x55dece578bf0)
ncvisual_blit:1192:blit to plane 0x55dece578bf0 at 0/0 geom 74x132
ncvisual_render_cells:1017:cblit: rows/cols: 74x132 plane: 74/132 pix: 222/264
Assertion desc failed at libswscale/swscale_internal.h:758
static av_always_inline int isYUV(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2;
}
hrmm, dubious; ncplayer version 3.0.11 (in /usr/local/bin(!) , installed 2024-10-02) works, whereas current blows up. they link the same. hrmmmm! unexpected!
oh hrrrrrm current just worked for me. let me see if this is file-specific or what.
yeah it's file-specific. the installed /usr/local/bin/ncplayer also aborts with aidsrobots, as does the system /usr/bin/ncplayer.
it seems like all pngs work fine, and all jpegs break
huh, mplayer also seems to fail with jpegs currently!
[schwarzgerat](0) $ ncplayer ../data/aidsrobots.jpeg
2 renders, 881.24µs (318.58µs min, 440.62µs avg, 562.65µs max)
2 rasters, 191.38µs (95.33µs min, 95.69µs avg, 96.06µs max)
2 writes, 15.24ms (207.75µs min, 7.62ms avg, 15.04ms max)
3.56MiB (23.63KiB min, 1.78MiB avg, 3.54MiB max) 1 input Ghpa: 0
0 failed renders, 0 failed rasters, 0 refreshes, 0 input errors
RGB emits:elides: def 1:54 fg 1:54 bg 0:0
Cell emits:elides: 55:38962 (99.86%) 98.18% 98.18% 0.00%
Bmap emits:elides: 2:0 (0.00%) 3.56MiB (100.00%) SuM: 0 (0.00%)
[schwarzgerat](0) $ mplayer ../data/aidsrobots.jpeg
MPlayer 1.5+svn38638-3 (Debian)do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing ../data/aidsrobots.jpeg.
libavformat version 61.9.101 (external)
Mismatching header version 61.7.100
libavformat file format detected.
[image2 @ 0x7f350ee7c080]Could find no file with path 'mp:../data/aidsrobots.jpeg' and index in the range 0-4
LAVF_header: av_open_input_stream() failed
Exiting... (End of file)
[schwarzgerat](0) $