Anton Khirnov
f3ed484953
h264_mp4toannexb_bsf: do not fail on annex B extradata
...
Just pass through the bitstream as is. This is the same as what is done
for HEVC already.
9 years ago
Anton Khirnov
33d18982fa
lavc: add a new bitstream filtering API
...
Deprecate the current bitstream filtering API.
9 years ago
赵宇龙
cd847839f3
h264_mp4toannexb: fix the pps offset when there are more than one sps in avcc
...
the pps offset is used to locate pps in the spspps_buf; however, the
current calc method is wrong because it is the offset of the original
avctx->extradata;
when there is only one sps in the avcc; the value is correct by
coincidence, however, it will fail in avcc with multi sps
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
3d126ef188
avcodec/h264_mp4toannexb_bsf: Use av_freep() to free spspps_buf
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
2bb54b82b5
avcodec/h264_mp4toannexb_bsf: Reorder operations in nal_size check
...
Fixes Ticket4778
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Ivan Uskov
1defff85cb
libavcodec/h264_mp4toannexb_bsf.c: Optional argument "private_spspps_buf" to avoid extradata modification.
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Benoit Fouet
904cfd257d
avcodec/h264_mp4toannexb_bsf: reset the new IDR flag when SPS/PPS is seen.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Benoit Fouet
d5ddcb5f8e
avcodec/h264_mp4toannexb_bsf: use the given padding in h264_extradata_to_annexb().
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Benoit Fouet
1cf4d2e9be
avcodec/h264_mp4toannexb_bsf: add a case when only SPS/PPS is in the stream.
...
When only SPS or PPS is present in the stream, copy the missing one from
AVCC before insertion to the output stream.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Benoit Fouet
f9bd6d61bc
h264_mp4toannexb_bsf: rename first_idr to new_idr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Benoit Fouet
42f25fe009
h264_mp4toannexb_bsf: always set idr_sps_pps_seen when SPS/PPS is seen.
...
In order not to break a sequence like "SPS IDR SPS IDR", the boolean
telling that the SPS/PPS has been seen should always be set.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Benoit Fouet
bf428bb314
h264_mp4toannexb_bsf: account for consecutive IDR pictures.
...
If there are consecutive IDR pictures, then SPS/PPS should be prepended
to all of them, not only the first one.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Chris \"Koying\" Browet
ad91bf854b
avcodec/h264_mp4toannexb_bsf: fix issue when sps/pps are already in the bistream
11 years ago
Michael Niedermayer
289b149cec
avcodec/h264_mp4toannexb_bsf: prepend global headers before any in stream parameter sets
...
Fixes h264_mp4toannexb_bsf_failure.mkv
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Alexandra Khirnova
9b8d11a76a
avcodec: Use av_reallocp where suitable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Paul B Mahol
2490996f38
avcodec: use designated initializers for bitstream filters
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Stefano Sabatini
53c853e049
lavc/h264_mp4toannexb: improve feedback in case of invalid bitstream
12 years ago
Luca Barbato
9e80eda26d
h264_mp4toannexb_bsf: return a padded buffer
...
The code using the returned buffer might expect it to be
FF_INPUT_BUFFER_PADDING_SIZE padded as any other avpacket.
12 years ago
Luca Barbato
8d929afd25
h264_mp4toannexb_bsf: factor out extradata parsing
12 years ago
Luca Barbato
5d21ca4559
h264_mp4toannexb_bsf: K&R formatting cosmetics
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
f1fdd208cc
h264_mp4toannexb_bsf: use i instead of misusing unit_type.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
gs_gail
361c4cdca9
h264_mp4toannexb_bsf: support 24bit lengths
13 years ago
Alex Converse
7181c4edee
cosmetics: Remove extra newlines at EOF
13 years ago
Michael Niedermayer
7ae251b4d8
h264_mp4toannexb_filter: pass error code through.
...
Bug-Found-by and Suggested bugfix: Tanami, Ohad
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9d4cb45dbe
Cleanup 'Fix spurious warning when stream has SPS and PPS units.'
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Philip Langdale
025225d7ee
h264_mp4toannexb_bsf: Fix spurious warning when stream has SPS and PPS units.
...
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Ronald S. Bultje
750fbbc249
reindent.
...
(cherry picked from commit 4e84f994d3
)
14 years ago
Sean McGovern
e4a2695856
h264_mp3toannexb_bsg: don't crash, but warn, if PPS/SPS not found.
...
Should an AVC-1 in MP4 stream not contain SPS or PPS NAL units,
this BSF is then unable to allocate an output buffer for the
modified stream. Warn that the resulting stream may be unplayable.
Fix roundup issue #2386 .
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 02dd3666c2
)
14 years ago
Ronald S. Bultje
4e84f994d3
reindent.
14 years ago
Sean McGovern
02dd3666c2
h264_mp3toannexb_bsg: don't crash, but warn, if PPS/SPS not found.
...
Should an AVC-1 in MP4 stream not contain SPS or PPS NAL units,
this BSF is then unable to allocate an output buffer for the
modified stream. Warn that the resulting stream may be unplayable.
Fix roundup issue #2386 .
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Diego Elio Pettenò
e7e2df27f8
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69
)
14 years ago
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Benoit Fouet
bb5cfc48f1
Cosmetics: alignment and long line break.
...
Originally committed as revision 23559 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Benoit Fouet
1f7d2f54c5
Cosmetics: use and place braces correctly in if ... else statements.
...
Originally committed as revision 23558 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Benoit Fouet
639c697c4f
Sanitize av_realloc() use in h264 mp4toannexb bistream filter.
...
Originally committed as revision 23557 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Luca Abeni
d5cc1ed723
Improve the mp4toannexb BSF to convert the extradata.
...
Originally committed as revision 23545 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Thomas Devanneaux
52486603b5
Check NAL unit size to avoid reading past the buffer.
...
This fixes issue1907
Patch by Thomas Devanneaux gmail(thomdev)
Originally committed as revision 23078 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
ec21c21563
Add a quick description to the H.264 BSF
...
Originally committed as revision 18809 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
6a5d31ac25
Fix build: Add intreadwrite.h and bswap.h #includes where necessary.
...
Originally committed as revision 16556 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Benoit Fouet
074bfa7de7
Change email address to a valid one.
...
Originally committed as revision 15848 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Andreas Öman
48aecf5a7d
Fix a bug causing the generated stream to be corrupt if the buffer
...
contains NAL units previous to the IDR where the SPS/PPS was inserted.
Ok:ed by Benoit on irc.
Originally committed as revision 11482 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Benoit Fouet
bdfae2a575
Add a bitstream filter for H.264.
...
Originally committed as revision 10422 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago