diff mbox series

[FFmpeg-devel] lavf/dv: return a meaningful error code from avpriv_dv_produce_packet()

Message ID 20220831024831.27391-1-anton@khirnov.net
State Accepted
Commit f0283f278a6a5f587d6cd66128b29d49ef42fb36
Headers show
Series [FFmpeg-devel] lavf/dv: return a meaningful error code from avpriv_dv_produce_packet() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Aug. 31, 2022, 2:48 a.m. UTC
---
 libavformat/dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/dv.c b/libavformat/dv.c
index f88fe62349..c888111789 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -404,7 +404,7 @@  int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
     if (buf_size < DV_PROFILE_BYTES ||
         !(c->sys = av_dv_frame_profile(c->sys, buf, buf_size)) ||
         buf_size < c->sys->frame_size) {
-        return -1;   /* Broken frame, or not enough data */
+        return AVERROR_INVALIDDATA;
     }
 
     /* Queueing audio packet */