aiffparse does not load AIFF file if read form a push-based source
The attached file 01-07-Various_Interprets-My_One_and_Only_Love-LLS.aif plays correctly if a typical local playback pipeline is used:
gst-launch-1.0 filesrc location=01-07-Various_Interprets-My_One_and_Only_Love-LLS.aif ! aiffparse ! audioconvert ! autoaudiosink
However, if a push-based source is used (filesrc is pull-based), then the pipeline never stops prerolling. Example using pushfilesrc:
gst-launch-1.0 pushfilesrc location=01-07-Various_Interprets-My_One_and_Only_Love-LLS.aif ! aiffparse ! audioconvert ! autoaudiosink
Log output shows endless log lines like:
0:00:01.810310596 30851 0x555e652ec050 LOG aiffparse aiffparse.c:605:gst_aiff_parse_peek_chunk:<aiffparse0> but only 198 bytes available now
0:00:01.810313006 30851 0x555e652ec050 DEBUG aiffparse aiffparse.c:574:gst_aiff_parse_peek_chunk_info:<aiffparse0> Next chunk size is 184522 bytes, type APPL
0:00:01.810315264 30851 0x555e652ec050 INFO aiffparse aiffparse.c:941:gst_aiff_parse_stream_headers:<aiffparse0> Got TAG: APPL, offset 20
0:00:01.810317737 30851 0x555e652ec050 DEBUG aiffparse aiffparse.c:574:gst_aiff_parse_peek_chunk_info:<aiffparse0> Next chunk size is 184522 bytes, type APPL
0:00:01.810319498 30851 0x555e652ec050 DEBUG aiffparse aiffparse.c:598:gst_aiff_parse_peek_chunk:<aiffparse0> Need to peek chunk of 184522 bytes
0:00:01.810321231 30851 0x555e652ec050 LOG aiffparse aiffparse.c:605:gst_aiff_parse_peek_chunk:<aiffparse0> but only 198 bytes available now
0:00:01.810323649 30851 0x555e652ec050 DEBUG aiffparse aiffparse.c:574:gst_aiff_parse_peek_chunk_info:<aiffparse0> Next chunk size is 184522 bytes, type APPL
0:00:01.810325894 30851 0x555e652ec050 INFO aiffparse aiffparse.c:941:gst_aiff_parse_stream_headers:<aiffparse0> Got TAG: APPL, offset 20
0:00:01.810328327 30851 0x555e652ec050 DEBUG aiffparse aiffparse.c:574:gst_aiff_parse_peek_chunk_info:<aiffparse0> Next chunk size is 184522 bytes, type APPL
0:00:01.810330101 30851 0x555e652ec050 DEBUG aiffparse aiffparse.c:598:gst_aiff_parse_peek_chunk:<aiffparse0> Need to peek chunk of 184522 bytes
0:00:01.810331846 30851 0x555e652ec050 LOG aiffparse aiffparse.c:605:gst_aiff_parse_peek_chunk:<aiffparse0> but only 198 bytes available now
0:00:01.810334301 30851 0x555e652ec050 DEBUG aiffparse aiffparse.c:574:gst_aiff_parse_peek_chunk_info:<aiffparse0> Next chunk size is 184522 bytes, type APPL
0:00:01.810336592 30851 0x555e652ec050 INFO aiffparse aiffparse.c:941:gst_aiff_parse_stream_headers:<aiffparse0> Got TAG: APPL, offset 20
0:00:01.810339036 30851 0x555e652ec050 DEBUG aiffparse aiffparse.c:574:gst_aiff_parse_peek_chunk_info:<aiffparse0> Next chunk size is 184522 bytes, type APPL
It turns out that this file contains not only audio, but also video:
ffprobe 01-07-Various_Interprets-My_One_and_Only_Love-LLS.aif
Stream #0:0: Audio: pcm_s16be, 44100 Hz, 2 channels, s16, 1411 kb/s
Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 600x600 [SAR 100:100 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
AFAIK, this is not officially supported in AIFF streams. aiffparse should recognize such an invalid file and either ignore all tracks except for the first audio one (and maybe output an element warning using GST_ELEMENT_WARNING), or report this as an error using GST_ELEMENT_ERROR.