From 717addecad77d85d329a4b502f4098d4912679d7 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 9 Oct 2012 00:41:34 +0200 Subject: Use proper return values in case of missing features --- libavformat/rtpdec_qt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat') diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c index 5dd1af1bc8..3093132672 100644 --- a/libavformat/rtpdec_qt.c +++ b/libavformat/rtpdec_qt.c @@ -99,7 +99,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, if (!is_start || !is_finish) { av_log_missing_feature(s, "RTP-X-QT with payload description " "split over several packets", 1); - return AVERROR(ENOSYS); + return AVERROR_PATCHWELCOME; } skip_bits(&gb, 12); // reserved data_len = get_bits(&gb, 16); @@ -162,7 +162,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, if (has_packet_info) { av_log_missing_feature(s, "RTP-X-QT with packet specific info", 1); - return AVERROR(ENOSYS); + return AVERROR_PATCHWELCOME; } alen = len - avio_tell(&pb); @@ -225,7 +225,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, default: /* unimplemented */ av_log_missing_feature(NULL, "RTP-X-QT with packing scheme 2", 1); - return AVERROR(ENOSYS); + return AVERROR_PATCHWELCOME; } } -- cgit v1.2.3 From 366484fff1720977b8591e3a90fbef9f4885e53c Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Thu, 11 Oct 2012 21:53:22 +0100 Subject: smjpeg: fix type of 'ret' variable in smjpeg_read_packet() The 'ret' variable is used for negative error codes so it should be a signed type. Signed-off-by: Mans Rullgard --- libavformat/smjpegdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/smjpegdec.c b/libavformat/smjpegdec.c index 7764c0f34d..4cbfa2a580 100644 --- a/libavformat/smjpegdec.c +++ b/libavformat/smjpegdec.c @@ -135,8 +135,9 @@ static int smjpeg_read_header(AVFormatContext *s) static int smjpeg_read_packet(AVFormatContext *s, AVPacket *pkt) { SMJPEGContext *sc = s->priv_data; - uint32_t dtype, ret, size, timestamp; + uint32_t dtype, size, timestamp; int64_t pos; + int ret; if (s->pb->eof_reached) return AVERROR_EOF; -- cgit v1.2.3 From 0a7005bebd23ade7bb852bce0401af1a8fdbb723 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Thu, 11 Oct 2012 21:59:12 +0100 Subject: rtpdec_xiph: fix function return type parse_packed_headers() returns either zero or a negative error code so its return type must be signed. Signed-off-by: Mans Rullgard --- libavformat/rtpdec_xiph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c index dc739eeb38..38f12bbc39 100644 --- a/libavformat/rtpdec_xiph.c +++ b/libavformat/rtpdec_xiph.c @@ -243,7 +243,7 @@ static int get_base128(const uint8_t ** buf, const uint8_t * buf_end) /** * Based off parse_packed_headers in Vorbis RTP */ -static unsigned int +static int parse_packed_headers(const uint8_t * packed_headers, const uint8_t * packed_headers_end, AVCodecContext * codec, PayloadContext * xiph_data) -- cgit v1.2.3