summaryrefslogtreecommitdiff
path: root/libavformat/dsfdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/dsfdec.c')
-rw-r--r--libavformat/dsfdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c
index 9be206af84..52cddab2c8 100644
--- a/libavformat/dsfdec.c
+++ b/libavformat/dsfdec.c
@@ -169,8 +169,8 @@ static int dsf_read_packet(AVFormatContext *s, AVPacket *pkt)
if (packet_size <= 0 || skip_size <= 0)
return AVERROR_INVALIDDATA;
- if (av_new_packet(pkt, packet_size) < 0)
- return AVERROR(ENOMEM);
+ if ((ret = av_new_packet(pkt, packet_size)) < 0)
+ return ret;
dst = pkt->data;
for (ch = 0; ch < st->codecpar->channels; ch++) {
ret = avio_read(pb, dst, packet_size / st->codecpar->channels);