On Sat, 21 Jul 2012, Samuel Pitoiset wrote:
--- libavformat/rtmpproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 4747899..f3353b8 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -834,7 +834,7 @@ static int handle_chunk_size(URLContext *s, RTMPPacket *pkt) rt->chunk_size = AV_RB32(pkt->data); if (rt->chunk_size <= 0) { av_log(s, AV_LOG_ERROR, "Incorrect chunk size %d\n", rt->chunk_size); - return -1; + return AVERROR(EINVAL); } av_log(s, AV_LOG_DEBUG, "New chunk size = %d\n", rt->chunk_size); -- 1.7.11.1
There's another -1 return in this function which you could take care of at the same time. And I think AVERROR_INVALIDDATA might be better, as Luca pointed out on one of the other patches. EINVAL is more for the case where the user passed some invalid parameter I think, while AVERROR_INVALIDDATA is for when the file is invalid. The server in network protocols probably counts more as the latter.
// Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
