mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/cbs: Only write extradata if there is something to write
It is e.g. legal for an ISOBMFF avcc to contain zero parameter sets. In this case the annex B that we produce would be empty and therefore useless. This happens e.g. with mov/frag_overlap.mp4 from the FATE-suite. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
7ae1c0dd3e
commit
a7e54196cc
@ -438,6 +438,10 @@ int ff_cbs_write_extradata(CodedBitstreamContext *ctx,
|
||||
return err;
|
||||
|
||||
av_freep(&par->extradata);
|
||||
par->extradata_size = 0;
|
||||
|
||||
if (!frag->data_size)
|
||||
return 0;
|
||||
|
||||
par->extradata = av_malloc(frag->data_size +
|
||||
AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user