mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
ffprobe: only hash extradata when it is present
Passing zero-sized/NULL buffers to av_hash_update() is invalid and may crash with certain hashes.
This commit is contained in:
parent
13180968f8
commit
544631cab1
@ -2748,8 +2748,11 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
|
||||
if (do_show_data)
|
||||
writer_print_data(w, "extradata", par->extradata,
|
||||
par->extradata_size);
|
||||
writer_print_data_hash(w, "extradata_hash", par->extradata,
|
||||
par->extradata_size);
|
||||
|
||||
if (par->extradata_size > 0) {
|
||||
writer_print_data_hash(w, "extradata_hash", par->extradata,
|
||||
par->extradata_size);
|
||||
}
|
||||
|
||||
/* Print disposition information */
|
||||
#define PRINT_DISPOSITION(flagname, name) do { \
|
||||
|
@ -50,7 +50,6 @@ bits_per_raw_sample=N/A
|
||||
nb_frames=1
|
||||
nb_read_frames=N/A
|
||||
nb_read_packets=1
|
||||
extradata_hash=adler32:00000001
|
||||
DISPOSITION:default=1
|
||||
DISPOSITION:dub=0
|
||||
DISPOSITION:original=0
|
||||
|
@ -50,7 +50,6 @@ bits_per_raw_sample=N/A
|
||||
nb_frames=1
|
||||
nb_read_frames=N/A
|
||||
nb_read_packets=1
|
||||
extradata_hash=adler32:00000001
|
||||
DISPOSITION:default=1
|
||||
DISPOSITION:dub=0
|
||||
DISPOSITION:original=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user