Mark Thompson
9d375e114a
h264_metadata: Fix AUD writing
...
The aud structure exists on the stack, so the variable was previously
out-of-scope when the unit is written.
7 years ago
Mark Thompson
2b41213500
h264_metadata: Remove redundant setting of SEI payload size
...
This should be derived from the data length rather than set explicitly.
7 years ago
James Almer
039be6a23f
avcodec/h264_metadata: fix memory leak in case of output packet creation failure
...
Some function calls may fail after the output packet is initialized.
Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Mark Thompson
1c49365c62
h264_metadata: Fix memory leak on multiple display orientation messages
...
Fixes CID #1430176 .
7 years ago
Jun Zhao
840f5b3e5b
lavc/h264_metadata_bsf: support dump options.
...
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
7 years ago
Mark Thompson
94d42cb4cc
h264_metadata: Remove unused fields
...
The SEI NAL is unused since 69062d0f9b
,
while the AUD NAL is small and would more sensibly be on the stack.
7 years ago
Mark Thompson
84c3c766d8
h264_metadata: Add support for display orientation SEI messages
7 years ago
Mark Thompson
56912555bc
h264_metadata: Actually fail when sei_user_data option is invalid
7 years ago
Mark Thompson
6d5a6dde53
h264_metadata: Add option to delete filler data
...
Deletes both filler NAL units and filler SEI messages. (Annex B zero_bytes
between NAL units are already discarded by the read/write process.)
7 years ago
Mark Thompson
78fa0b9033
h264_metadata: Always add the SEI user data to the first access unit
...
This should be added even if the first access unit does not contain
parameter sets.
7 years ago
Mark Thompson
69062d0f9b
h264_metadata: Use common SEI addition function
7 years ago
Mark Thompson
ce5870a3a8
cbs: Refcount all the things!
...
This makes it easier for users of the CBS API to get alloc/free right -
all subelements use the buffer API so that it's clear how to free them.
It also allows eliding some redundant copies: the packet -> fragment copy
disappears after this change if the input packet is refcounted, and more
codec-specific cases are now possible (but not included in this patch).
7 years ago
Mark Thompson
2651352988
cbs: Allocate the context inside the init function
...
... instead of making callers allocate it themselves. This is more
consistent with other APIs in libav.
7 years ago
Mark Thompson
d5fcf94261
h264_metadata: Fix clearing SEI payload in error case
7 years ago
James Almer
9a6e4c88d6
avcodec/h264_metadata_bsf: fix the AVClass version number
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Mark Thompson
d792613bad
h264_metadata: Fix clearing SEI payload in error case
...
Fixes CID 1419832, 1419835.
7 years ago
Mark Thompson
a308872b04
lavc: Add h264_metadata bitstream filter
...
This is able to modify some header metadata found in the SPS/VUI,
and can also add/remove AUDs and insert user data in SEI NAL units.
(cherry picked from commit 9e93001b61
)
(cherry picked from commit c42b62d1f9
)
7 years ago
Mark Thompson
c42b62d1f9
h264_metadata: Fix double-free
...
Whether the udu string should be freed depends on whether the SEI it
gets added to was created internally by cbs or externally by the bsf.
The current code frees it twice in the former case.
8 years ago
Mark Thompson
9e93001b61
lavc: Add h264_metadata bitstream filter
...
This is able to modify some header metadata found in the SPS/VUI,
and can also add/remove AUDs and insert user data in SEI NAL units.
8 years ago