1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
Commit Graph

36 Commits

Author SHA1 Message Date
Andreas Rheinhardt
bc70684e74 avformat: Constify all muxer/demuxers
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>
2021-04-27 11:48:06 -03:00
Paul B Mahol
60c4459075 avformat/brstm: remove custom allocation of table to hold coeffs 2020-09-12 14:52:31 +02:00
Paul B Mahol
3382b0290a avformat/brstm: fix decoding brstm with custom coeff offsets 2020-09-12 14:52:31 +02:00
Paul B Mahol
f4b84d89d1 avformat/brstm: clip timestamp when seeking into acceptable range 2020-09-10 17:38:08 +02:00
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>
2020-02-10 22:41:38 +01:00
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>
2019-12-12 19:25:33 +01:00
Carl Eugen Hoyos
4d8875ec23 lavf: Constify the probe function argument.
Reviewed-by: Lauri Kasanen
Reviewed-by: Tomas Härdin
2019-03-21 11:42:17 +01:00
Clément Bœsch
549045254c Fix all -Wformat warnings raised by DJGPP 2017-03-29 14:49:29 +02:00
Derek Buitenhuis
6f69f7a8bf Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
  lavf: replace AVStream.codec with AVStream.codecpar

This has been a HUGE effort from:
    - Derek Buitenhuis <derek.buitenhuis@gmail.com>
    - Hendrik Leppkes <h.leppkes@gmail.com>
    - wm4 <nfxjfg@googlemail.com>
    - Clément Bœsch <clement@stupeflix.com>
    - James Almer <jamrial@gmail.com>
    - Michael Niedermayer <michael@niedermayer.cc>
    - Rostislav Pehlivanov <atomnuker@gmail.com>

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Paul B Mahol
76466ab214 avformat/brstm: lower magic number, fixes decoding of some files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-03 19:20:44 +02:00
Andreas Cadhalpun
1cb2331eca brstm: fix missing closing brace
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-04 13:44:16 +01:00
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>
2016-01-04 13:20:09 +01:00
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>
2016-01-04 13:19:59 +01:00
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>
2015-11-10 22:06:26 +01:00
Hendrik Leppkes
c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Paul B Mahol
3441fef0f8 avformat/brstm: fix overflow
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-23 19:10:13 +02:00
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>
2015-07-12 12:17:40 +02:00
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>
2015-06-27 14:15:12 +02:00
Rodger Combs
0643b4bf74 lavf/brstm: expose the loop point when present
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-25 19:17:01 +02:00
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>
2015-06-24 14:31:54 -03:00
Paul B Mahol
a49154e9d7 avformat/brstm: support little-endian s16 PCM
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-21 10:32:13 +00:00
Rodger Combs
d2ce10093e lavf/brstm: handle a BFSTM endianness oddity 2015-06-21 10:32:13 +00:00
Rodger Combs
9c9cf3956c lavf/brstm: add support for seeking 2015-06-21 10:32:12 +00:00
Rodger Combs
70a39bcf1c lavf/brstm: cleanup; fix short-block demuxing 2015-06-21 10:32:12 +00:00
Rodger Combs
6c56827e62 lavf/brstm: move bfstm var to a local 2015-06-21 10:32:12 +00:00
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>
2015-06-20 19:21:08 +02:00
Rodger Combs
d4c9eced98 lavf/brstm: support little-endian files (BCSTM; 3DS)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-20 16:50:47 +02:00
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>
2015-06-17 13:24:11 +02:00
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>
2014-08-08 00:48:38 +02:00
Lou Logan
88f2586adb fix various typos
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 10:58:19 -08:00
Paul B Mahol
a9b424879f lavc & lavf: replace deprecated av_log* functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-15 18:10:28 +00:00
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>
2012-12-16 15:05:31 +01:00
Paul B Mahol
5be38f9421 brstm: add missing new line to request for sample messages
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-16 13:04:17 +00:00
James Almer
7959c26fb0 brstm: fix number of samples for the last block
Signed-off-by: James Almer <jamrial@gmail.com>
2012-12-16 10:34:33 +00:00
Paul B Mahol
fe63d41302 brstm: do not return partial packets
Such packets are useless.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-07 17:55:45 +00:00
Paul B Mahol
9a31997938 BRSTM demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-29 19:04:35 +00:00