|
|
@ -25,7 +25,7 @@ static int daud_init(struct AVFormatContext *s) |
|
|
|
{ |
|
|
|
{ |
|
|
|
AVCodecParameters *par = s->streams[0]->codecpar; |
|
|
|
AVCodecParameters *par = s->streams[0]->codecpar; |
|
|
|
if (par->channels!=6 || par->sample_rate!=96000) |
|
|
|
if (par->channels!=6 || par->sample_rate!=96000) |
|
|
|
return -1; |
|
|
|
return AVERROR(EINVAL); |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -34,7 +34,7 @@ static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt) |
|
|
|
if (pkt->size > 65535) { |
|
|
|
if (pkt->size > 65535) { |
|
|
|
av_log(s, AV_LOG_ERROR, |
|
|
|
av_log(s, AV_LOG_ERROR, |
|
|
|
"Packet size too large for s302m. (%d > 65535)\n", pkt->size); |
|
|
|
"Packet size too large for s302m. (%d > 65535)\n", pkt->size); |
|
|
|
return -1; |
|
|
|
return AVERROR_INVALIDDATA; |
|
|
|
} |
|
|
|
} |
|
|
|
avio_wb16(s->pb, pkt->size); |
|
|
|
avio_wb16(s->pb, pkt->size); |
|
|
|
avio_wb16(s->pb, 0x8010); // unknown
|
|
|
|
avio_wb16(s->pb, 0x8010); // unknown
|
|
|
|