mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/genh: Check av_new_packet() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
58b19b6f63
commit
acf23d9451
|
@ -153,7 +153,9 @@ static int genh_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
|
|
||||||
if (avio_feof(s->pb))
|
if (avio_feof(s->pb))
|
||||||
return AVERROR_EOF;
|
return AVERROR_EOF;
|
||||||
av_new_packet(pkt, 8 * codec->channels);
|
ret = av_new_packet(pkt, 8 * codec->channels);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
for (i = 0; i < 8 / c->interleave_size; i++) {
|
for (i = 0; i < 8 / c->interleave_size; i++) {
|
||||||
for (ch = 0; ch < codec->channels; ch++) {
|
for (ch = 0; ch < codec->channels; ch++) {
|
||||||
pkt->data[ch * 8 + i*c->interleave_size+0] = avio_r8(s->pb);
|
pkt->data[ch * 8 + i*c->interleave_size+0] = avio_r8(s->pb);
|
||||||
|
|
Loading…
Reference in New Issue