summaryrefslogtreecommitdiff
path: root/libavformat/pp_bnk.c
Commit message (Collapse)AuthorAge
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/pp_bnk: allow seeking to startZane van Iperen2021-03-25
| | | | | | Allows "ffplay -loop" to work. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/pp_bnk: Fix memleaks when reading non-stereo tracksAndreas Rheinhardt2021-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 6973df112275c8ea4af0bf3cb1338baecc1d06b3 added support for music tracks by outputting its two containing tracks together in one packet. But the actual data is not contiguous in the file and therefore one can't simply use av_get_packet() (which has been used before) for it. Therefore the packet was now allocated via av_new_packet() and read via avio_read(); and this is also for non-music files. This causes problems because one can now longer rely on things done automatically by av_get_packet(): It automatically freed the packet in case of errors; this lead to memleaks in several FATE-tests covering this demuxer. Furthermore, in case the data read is less than the data desired, the returned packet was not zero-allocated (the packet's padding was uninitialized); for music files the actual data could even be uninitialized. The former problems are fixed by using av_get_packet() for non-music files; the latter problem is handled by erroring out unless both tracks could be fully read. Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/pp_bnk: treat music files as stereoZane van Iperen2021-03-19
| | | | | | | | | | These files are technically a series of planar mono tracks. If the "music" flag is set, merge the packets from the two mono tracks, essentially replicating: [0:a:0][0:a:1]join=inputs=2:channel_layout=stereo[a] Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat: add demuxer for Pro Pinball Series' SoundbanksZane van Iperen2020-05-05
Adds support for the soundbank files used by the Pro Pinball series of games. https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2020-May/262094.html Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>