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

26 Commits

Author SHA1 Message Date
Andreas Rheinhardt
13d72cecd5 avcodec/extract_extradata: Reindent after the last commit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:38:18 +02:00
Andreas Rheinhardt
520d9a8de2 avcodec/extract_extradata: Remove always-true check
If a sequence header has already been found, it is certain that next
startcode (being disjoint from the sequence header startcode) can begin
at index four at the earliest.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:38:18 +02:00
Andreas Rheinhardt
16c916e4c9 avcodec/extract_extradata: Consolidate zeroing extradata padding
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 15:33:25 +02:00
Anton Khirnov
bdd6aa25c1 avcodec.h: split bitstream filters API into its own header 2020-05-22 14:38:57 +02:00
Anton Khirnov
bf80725352 lavc: rename bsf.h to bsf_internal.h
This will allow adding a public header named bsf.h
2020-05-22 14:38:57 +02:00
Andriy Gelman
99d78e4f42 lavc/extract_extradata: Use bytestream api
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-30 11:34:51 -03:00
Andreas Rheinhardt
76e0ecec0b avcodec/extract_extradata_bsf: Don't unref uninitialized buffers
This happens if allocating extradata fails and s->remove is unset.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-30 09:59:30 -03:00
leozhang
84c27c8c08 avcodec/extract_extradata_bsf: fix typo in comments
Signed-off-by: leozhang <leozhang@qiyi.com>
Reviewed-by: Gyan <ffmpeg@gyani.pro>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-06 20:38:03 +01:00
Andreas Rheinhardt
992532ee31 h2645_parse: Make ff_h2645_packet_split reference-compatible
This is in preparation for a patch for cbs_h2645. Now the packet's
rbsp_buffer can be owned by an AVBuffer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2019-01-23 22:33:43 +00:00
hwren
b8da7ba5ac lavc/extract_extradata_bsf.c: add AVS2
Signed-off-by: hwren <hwrenx@126.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-23 16:00:26 +02:00
James Almer
3870ed7ab3 avcodec/extract_extradata_bsf: make sure a Sequence Header was found for av1
A packet may have Metadata OBUs but no Sequence Header OBU, which is
useless as extradata.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 20:43:40 -03:00
James Almer
f9af3929c0 avcodec/extract_extradata: add support for AV1
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 11:43:24 -03:00
James Almer
016d40011a avcodec/extract_extradata: don't uninitialize the H2645Packet on every processed packet
Based on hevc_parser code. This prevents repeated unnecessary allocations
and frees on every packet processed by the bsf.

Reviewed-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-22 17:13:56 -03:00
Jun Zhao
edce64c9e9 lavc/extract_extradata_bsf: support dump options.
support dump bit stream filter options

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 12:16:35 -03:00
James Almer
9c6dd9d624 avcodec/extract_extradata: move the reference in the bsf internal buffer
There's no need to allocate a new packet for it.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-11 15:39:47 -03:00
James Almer
2536bd8632 avcodec/extract_extradata: don't allocate more space than needed when removing NALUs in h264/hevc
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-10 19:29:54 -03:00
James Almer
d168e78eff avcodec/extract_extradata: zero initalize the padding bytes in all allocated buffers
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-09 13:00:58 -03:00
Nikolas Bowe
5a412a5c3c avcodec/extract_extradata_bsf: Fix leak discovered via fuzzing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-06 18:27:09 +01:00
James Almer
7bae17e37a avcodec/extract_extradata: return an error when buffer allocation fails
ret is 0 by default.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-13 17:22:00 -03:00
James Almer
cbd2502939 avcodec/extract_extradata_bsf: make sure all parameter set NAL units were found for h264/hevc
Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-01 17:59:06 -03:00
James Almer
3fe7bb2bcf avcodec/extract_extradata_bsf: add missing break statement to extract_extradata_vc1 2017-03-28 01:14:17 -03:00
James Almer
b53ac2a528 avcodec/extract_extradata_bsf: use the parsing code from mpeg4video_split()
It's a simplifaction of the same code, originally commited as 3b5ad8fbf7.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-25 22:38:13 -03:00
James Almer
173fdc4dea avcodec/extract_extradata_bsf: use the parsing code from vc1_split()
It's a simplifaction of the same code, originally commited as b4b9a64bdb.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-25 22:38:13 -03:00
James Almer
ec996163c8 avcodec/extract_extradata_bsf: use the parsing code from mpegvideo_split()
Changes to the parsing code originally committed to mpegvideo_parser.c
in 73fb23dc5a.
Required by some samples, like PVA_test-partial.pva

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-25 22:38:13 -03:00
James Almer
7ebc9f8df4 Merge commit '89b35a139e838deeb32ec20d8d034c81014401d0'
* commit '89b35a139e838deeb32ec20d8d034c81014401d0':
  lavc: add a bitstream filter for extracting extradata from packets

Merged-by: James Almer <jamrial@gmail.com>
2017-03-23 16:31:15 -03:00
Anton Khirnov
89b35a139e lavc: add a bitstream filter for extracting extradata from packets
This is intended as a replacement for the 'split' function exported by
some parsers.
2016-10-16 20:27:16 +02:00