|
|
@ -29,7 +29,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
static av_cold int oma_write_header(AVFormatContext *s) |
|
|
|
static av_cold int oma_write_header(AVFormatContext *s) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int i; |
|
|
|
|
|
|
|
AVCodecParameters *par; |
|
|
|
AVCodecParameters *par; |
|
|
|
int srate_index; |
|
|
|
int srate_index; |
|
|
|
int isjointstereo; |
|
|
|
int isjointstereo; |
|
|
@ -55,8 +54,7 @@ static av_cold int oma_write_header(AVFormatContext *s) |
|
|
|
avio_w8(s->pb, EA3_HEADER_SIZE >> 7); |
|
|
|
avio_w8(s->pb, EA3_HEADER_SIZE >> 7); |
|
|
|
avio_w8(s->pb, EA3_HEADER_SIZE & 0x7F); |
|
|
|
avio_w8(s->pb, EA3_HEADER_SIZE & 0x7F); |
|
|
|
avio_wl16(s->pb, 0xFFFF); /* not encrypted */ |
|
|
|
avio_wl16(s->pb, 0xFFFF); /* not encrypted */ |
|
|
|
for (i = 0; i < 6; i++) |
|
|
|
ffio_fill(s->pb, 0, 6 * 4); /* Padding + DRM id */ |
|
|
|
avio_wl32(s->pb, 0); /* Padding + DRM id */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (par->codec_tag) { |
|
|
|
switch (par->codec_tag) { |
|
|
|
case OMA_CODECID_ATRAC3: |
|
|
|
case OMA_CODECID_ATRAC3: |
|
|
@ -88,8 +86,7 @@ static av_cold int oma_write_header(AVFormatContext *s) |
|
|
|
av_fourcc2str(par->codec_tag)); |
|
|
|
av_fourcc2str(par->codec_tag)); |
|
|
|
return AVERROR(EINVAL); |
|
|
|
return AVERROR(EINVAL); |
|
|
|
} |
|
|
|
} |
|
|
|
for (i = 0; i < (EA3_HEADER_SIZE - 36)/4; i++) |
|
|
|
ffio_fill(s->pb, 0, EA3_HEADER_SIZE - 36); /* Padding */ |
|
|
|
avio_wl32(s->pb, 0); /* Padding */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|