ffmpeg/libavcodec/bsf
Zhao Zhili 25812d3033 avcodec/bsf/h264_mp4toannexb: Fix mixed bitstream format
This bsf converts AV_PKT_DATA_NEW_EXTRADATA side data in avcc format
to in-band annexb format. However, the side data wasn't been removed
and copied from input packet to output packet. So the output packet
has mixed bitstream format. We don't support mixed bitstream format.
For example, h264_metadata report error in the following case:

ffmpeg -i foo.flv \
  -bsf:v "h264_mp4toannexb,h264_metadata" \
  -c copy -f null

This patch removed NEW_EXTRADATA side data after process.

This patch also add a check so only NEW_EXTRADATA in avcc format is
processed. NEW_EXTRADATA in annexb format is copied to output as is.

Reported-by: jiangjie <jiangjie618@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-04-29 15:25:08 +08:00
..
aac_adtstoasc.c avcodec/adts_header: Add ff_adts_header_parse_buf() 2024-05-20 12:06:31 +02:00
apv_metadata.c lavc: APV metadata bitstream filter 2025-04-27 15:52:30 +01:00
av1_frame_merge.c
av1_frame_split.c
av1_metadata.c
chomp.c
dca_core.c
dovi_rpu.c avcodec/bsf/dovi_rpu: remove EL when stripping dovi metadata 2024-11-28 14:15:50 +01:00
dts2pts.c lavc/refstruct: move to lavu and make public 2024-12-15 14:03:47 +01:00
dump_extradata.c
dv_error_marker.c
eac3_core.c
evc_frame_merge.c
extract_extradata.c avcodec/h2645_parse: replace three bool arguments in ff_h2645_packet_split with a single flags one 2024-08-19 20:23:20 -03:00
filter_units.c avcodec/filter_units: Fix extradata and packets can have different bitstream format 2024-08-24 00:27:15 +08:00
h264_metadata.c
h264_mp4toannexb.c avcodec/bsf/h264_mp4toannexb: Fix mixed bitstream format 2025-04-29 15:25:08 +08:00
h264_redundant_pps.c
h265_metadata.c avcodec/h265_metadata: Add options to set width/height after crop 2024-06-07 13:14:46 +08:00
h266_metadata.c
hapqa_extract.c
hevc_mp4toannexb.c avcodec/hevc_mp4toannexb: prepend extradata before the leading PS for an IRAP 2025-02-14 00:21:19 -03:00
imx_dump_header.c
Makefile lavc: APV metadata bitstream filter 2025-04-27 15:52:30 +01:00
media100_to_mjpegb.c bsf/media100_to_mjpegb: Clear output buffer padding 2024-08-14 18:20:59 +02:00
mjpeg2jpeg.c
mjpega_dump_header.c
movsub.c
mpeg2_metadata.c
mpeg4_unpack_bframes.c
noise.c
null.c
opus_metadata.c
pcm_rechunk.c
pgs_frame_merge.c
prores_metadata.c
remove_extradata.c lavc/hevc*: move to hevc/ subdir 2024-06-04 11:46:27 +02:00
setts.c
showinfo.c avcodec/bsf/showinfo: print packet data checksum 2024-07-13 23:48:34 -03:00
trace_headers.c
truehd_core.c
vp9_metadata.c
vp9_raw_reorder.c
vp9_superframe.c
vp9_superframe_split.c
vvc_mp4toannexb.c