mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/argo_asf: initialise file header inline
Garbage was left-over in the ArgoASFFileHeader::name field if the url was too short. This zero-initialises it. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
This commit is contained in:
parent
7cc8a2bb0b
commit
c79f07cc0c
@ -314,14 +314,15 @@ static int argo_asf_write_header(AVFormatContext *s)
|
|||||||
{
|
{
|
||||||
const AVCodecParameters *par = s->streams[0]->codecpar;
|
const AVCodecParameters *par = s->streams[0]->codecpar;
|
||||||
ArgoASFMuxContext *ctx = s->priv_data;
|
ArgoASFMuxContext *ctx = s->priv_data;
|
||||||
ArgoASFFileHeader fhdr;
|
|
||||||
ArgoASFChunkHeader chdr;
|
ArgoASFChunkHeader chdr;
|
||||||
|
ArgoASFFileHeader fhdr = {
|
||||||
|
.magic = ASF_TAG,
|
||||||
|
.version_major = (uint16_t)ctx->version_major,
|
||||||
|
.version_minor = (uint16_t)ctx->version_minor,
|
||||||
|
.num_chunks = 1,
|
||||||
|
.chunk_offset = ASF_FILE_HEADER_SIZE
|
||||||
|
};
|
||||||
|
|
||||||
fhdr.magic = ASF_TAG;
|
|
||||||
fhdr.version_major = (uint16_t)ctx->version_major;
|
|
||||||
fhdr.version_minor = (uint16_t)ctx->version_minor;
|
|
||||||
fhdr.num_chunks = 1;
|
|
||||||
fhdr.chunk_offset = ASF_FILE_HEADER_SIZE;
|
|
||||||
/*
|
/*
|
||||||
* If the user specified a name, use it as is. Otherwise take the
|
* If the user specified a name, use it as is. Otherwise take the
|
||||||
* basename and lop off the extension (if any).
|
* basename and lop off the extension (if any).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user