Thank you for your patience with this patch.
> This code also reads the VQFR chunk before seeking back, so this needs > to be changed or accounted for. > > > + ffio_ensure_seekback(pb, wsvqa->vqfl_chunk_size + 512 * 1024); > > + avio_skip(pb, chunk_size + skip_byte); That's right. I measured that VQFR's size seems to be less than 140 KiB in my test files so a 256 KiB extra padding should be safe. > > + av_packet_unref(pkt); > > This fixes the memleak, yet the main data is still read twice. > > > + if (av_get_packet(pb, pkt, wsvqa->vqfl_chunk_size) < 0) > > + return AVERROR(EIO); Alright I didn't think reading the data twice was a problem. Anyway, I realized that the decoder doesn't care about the chunk order. The VQFL chunk is now appended to the VQFR chunk which simplifies the logic. I hope this isn't too clever a solution. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".