FFmpeg/libavcodec/bsf
Zhao Zhili 94784d0918 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>
(cherry picked from commit 25812d3033)
2025-05-12 11:58:56 +08:00
..
aac_adtstoasc.c
av1_frame_merge.c
av1_frame_split.c
av1_metadata.c
chomp.c
dca_core.c
dovi_rpu.c avcodec/bsf/dovi_rpu: add new bitstream filter 2024-08-16 11:48:02 +02:00
dts2pts.c avcodec/bsf/dts2pts: don't zero the node buffers when allocating them 2024-09-19 23:23:14 -03: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-05-12 11:58:56 +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 lavc/hevc*: move to hevc/ subdir 2024-06-04 11:46:27 +02:00
imx_dump_header.c
Makefile avcodec/bsf/dovi_rpu: add new bitstream filter 2024-08-16 11:48:02 +02: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