Andreas Rheinhardt
6a67d518d6
avformat: Remove unnecessary av_packet_unref()
...
Since bae8844e
the packet will always be unreferenced when a demuxer
returns an error, so that a lot of calls to av_packet_unref() in lots of
demuxers are now redundant and can be removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years ago
Andreas Rheinhardt
c1e439d7e9
avformat: Forward errors where possible
...
It is not uncommon to find code where the caller thinks to know better
what the return value should be than the callee. E.g. something like
"if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit
changes several instances of this to instead forward the actual error.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Carl Eugen Hoyos
4d8875ec23
lavf: Constify the probe function argument.
...
Reviewed-by: Lauri Kasanen
Reviewed-by: Tomas Härdin
6 years ago
Clément Bœsch
549045254c
Fix all -Wformat warnings raised by DJGPP
8 years ago
Paul B Mahol
76466ab214
avformat/brstm: lower magic number, fixes decoding of some files
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Andreas Cadhalpun
1cb2331eca
brstm: fix missing closing brace
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
bcf4ee26a0
brstm: also allocate b->table in read_packet
...
This fixes NULL pointer dereferencing if the codec is forced to
adpcm_thp even though a different one was detected.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
d7d37c479f
brstm: make sure an ADPC chunk was read for adpcm_thp
...
This fixes NULL pointer dereferencing.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
7b67fe20f6
brstm: reject negative sample rate
...
A negative sample rate causes assertion failures in av_rescale_rnd.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Hendrik Leppkes
c2f861ca42
Replace remaining occurances of av_free_packet with av_packet_unref
9 years ago
Paul B Mahol
3441fef0f8
avformat/brstm: fix overflow
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Michael Niedermayer
cdb0d7e439
avformat/brstm: Remove unused variable
...
Fixes "libavformat/brstm.c:128:35: warning: variable info_size set but not used"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Rodger Combs
68f00fb40b
lavf/brstm: if the file lies about the last block's size, correct it
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Rodger Combs
0643b4bf74
lavf/brstm: expose the loop point when present
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
58d7dde081
brstm: fix use of uninitialized variables
...
Fixes valgrind complaining about "Conditional jump or move depends on uninitialised value(s)"
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Paul B Mahol
a49154e9d7
avformat/brstm: support little-endian s16 PCM
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Rodger Combs
d2ce10093e
lavf/brstm: handle a BFSTM endianness oddity
10 years ago
Rodger Combs
9c9cf3956c
lavf/brstm: add support for seeking
10 years ago
Rodger Combs
70a39bcf1c
lavf/brstm: cleanup; fix short-block demuxing
10 years ago
Rodger Combs
6c56827e62
lavf/brstm: move bfstm var to a local
10 years ago
Rodger Combs
db426031dd
lavf/brstm: allow larger block sizes
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Rodger Combs
d4c9eced98
lavf/brstm: support little-endian files (BCSTM; 3DS)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Rodger Combs
bb42a7d4d4
lavf/brstm: add support for BFSTM files
...
Previous version reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
d34ec64a22
replace calls to url_feof() with avio_feof()
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Lou Logan
88f2586adb
fix various typos
...
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
de89dff8da
brstm: ask for samples for version != 1.0
...
This also avoids 2 unused variable warnings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
5be38f9421
brstm: add missing new line to request for sample messages
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
James Almer
7959c26fb0
brstm: fix number of samples for the last block
...
Signed-off-by: James Almer <jamrial@gmail.com>
12 years ago
Paul B Mahol
fe63d41302
brstm: do not return partial packets
...
Such packets are useless.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
9a31997938
BRSTM demuxer
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago