summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/4xm.c1
-rw-r--r--libavformat/a64.c1
-rw-r--r--libavformat/aiffenc.c1
-rw-r--r--libavformat/applehttp.c1
-rw-r--r--libavformat/asfdec.c7
-rw-r--r--libavformat/assdec.c1
-rw-r--r--libavformat/audiointerleave.c1
-rw-r--r--libavformat/avformat.h1
-rw-r--r--libavformat/avidec.c19
-rw-r--r--libavformat/bethsoftvid.c2
-rw-r--r--libavformat/cafdec.c1
-rw-r--r--libavformat/cafenc.c1
-rw-r--r--libavformat/dv.c1
-rw-r--r--libavformat/dvenc.c1
-rw-r--r--libavformat/ffmdec.c1
-rw-r--r--libavformat/ffmenc.c1
-rw-r--r--libavformat/ffmetadec.c1
-rw-r--r--libavformat/flvdec.c1
-rw-r--r--libavformat/flvenc.c1
-rw-r--r--libavformat/gxfenc.c2
-rw-r--r--libavformat/idroqdec.c1
-rw-r--r--libavformat/internal.h4
-rw-r--r--libavformat/matroskaenc.c2
-rw-r--r--libavformat/mm.c2
-rw-r--r--libavformat/mmsh.c1
-rw-r--r--libavformat/mov.c3
-rw-r--r--libavformat/movenc.c2
-rw-r--r--libavformat/mp3dec.c1
-rw-r--r--libavformat/mpegenc.c1
-rw-r--r--libavformat/mpegtsenc.c1
-rw-r--r--libavformat/mxfdec.c1
-rw-r--r--libavformat/nsvdec.c2
-rw-r--r--libavformat/nut.c1
-rw-r--r--libavformat/nutdec.c1
-rw-r--r--libavformat/nutenc.c1
-rw-r--r--libavformat/nuv.c1
-rw-r--r--libavformat/oggenc.c1
-rw-r--r--libavformat/oma.c1
-rw-r--r--libavformat/pcm.c1
-rw-r--r--libavformat/psxstr.c1
-rw-r--r--libavformat/r3d.c1
-rw-r--r--libavformat/riff.c1
-rw-r--r--libavformat/rl2.c1
-rw-r--r--libavformat/rtmppkt.c1
-rw-r--r--libavformat/rtmpproto.c2
-rw-r--r--libavformat/rtpdec.c1
-rw-r--r--libavformat/rtpenc.c1
-rw-r--r--libavformat/rtsp.c19
-rw-r--r--libavformat/rtsp.h6
-rw-r--r--libavformat/rtspdec.c1
-rw-r--r--libavformat/seek.c1
-rw-r--r--libavformat/soxdec.c1
-rw-r--r--libavformat/soxenc.c1
-rw-r--r--libavformat/swfdec.c1
-rw-r--r--libavformat/thp.c1
-rw-r--r--libavformat/utils.c1
-rw-r--r--libavformat/vqf.c1
-rw-r--r--libavformat/wav.c2
-rw-r--r--libavformat/wc3movie.c1
-rw-r--r--libavformat/wtvdec.c2
60 files changed, 74 insertions, 47 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 0b79c761a5..92bf072cfd 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -28,6 +28,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
#define RIFF_TAG MKTAG('R', 'I', 'F', 'F')
diff --git a/libavformat/a64.c b/libavformat/a64.c
index 3481ee7d03..476db1cf3c 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -55,7 +55,6 @@ static int a64_write_header(struct AVFormatContext *s)
break;
default:
return AVERROR(EINVAL);
- break;
}
avio_write(s->pb, header, 2);
c->prev_pkt.size = 0;
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index 34ab0cc246..0e6a061fc8 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
#include "aiff.h"
#include "avio_internal.h"
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index ddf97e9d31..f545487d57 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -27,6 +27,7 @@
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "avformat.h"
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index db00964c8a..6935a97f28 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -25,6 +25,7 @@
#include "libavutil/common.h"
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
+#include "libavutil/mathematics.h"
#include "libavcodec/mpegaudio.h"
#include "avformat.h"
#include "avio_internal.h"
@@ -84,13 +85,11 @@ static const ff_asf_guid index_guid = {
0x90, 0x08, 0x00, 0x33, 0xb1, 0xe5, 0xcf, 0x11, 0x89, 0xf4, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xcb
};
+#ifdef DEBUG
static const ff_asf_guid stream_bitrate_guid = { /* (http://get.to/sdp) */
0xce, 0x75, 0xf8, 0x7b, 0x8d, 0x46, 0xd1, 0x11, 0x8d, 0x82, 0x00, 0x60, 0x97, 0xc9, 0xa2, 0xb2
};
-/**********************************/
-/* decoding */
-#ifdef DEBUG
#define PRINT_IF_GUID(g,cmp) \
if (!ff_guidcmp(g, &cmp)) \
av_dlog(NULL, "(GUID: %s) ", #cmp)
@@ -1094,8 +1093,6 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
assert(asf->packet_size_left < FRAME_HEADER_SIZE || asf->packet_segments < 1);
asf->packet_time_start = 0;
}
-
- return 0;
}
// Added to support seeking after packets have been read
diff --git a/libavformat/assdec.c b/libavformat/assdec.c
index 3dc28f21fe..e2cebf8875 100644
--- a/libavformat/assdec.c
+++ b/libavformat/assdec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/mathematics.h"
#include "avformat.h"
#include "internal.h"
diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c
index 3c235c069e..844112fcf5 100644
--- a/libavformat/audiointerleave.c
+++ b/libavformat/audiointerleave.c
@@ -21,6 +21,7 @@
*/
#include "libavutil/fifo.h"
+#include "libavutil/mathematics.h"
#include "avformat.h"
#include "audiointerleave.h"
#include "internal.h"
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 558f3c5ea0..6b0cd4917b 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -41,6 +41,7 @@ const char *avformat_license(void);
#include <stdio.h> /* FILE */
#include "libavcodec/avcodec.h"
#include "libavutil/dict.h"
+#include "libavutil/log.h"
#include "avio.h"
#include "libavformat/version.h"
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 8e9cd07c17..b28d39b06d 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -21,6 +21,7 @@
#include <strings.h>
#include "libavutil/intreadwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/bswap.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
@@ -1289,20 +1290,16 @@ static int avi_load_index(AVFormatContext *s)
(tag >> 16) & 0xff,
(tag >> 24) & 0xff,
size);
- switch(tag) {
- case MKTAG('i', 'd', 'x', '1'):
- if (avi_read_idx1(s, size) < 0)
- goto skip;
+
+ if (tag == MKTAG('i', 'd', 'x', '1') &&
+ avi_read_idx1(s, size) >= 0) {
ret = 0;
- goto the_end;
- break;
- default:
- skip:
- size += (size & 1);
- if (avio_skip(pb, size) < 0)
- goto the_end; // something is wrong here
break;
}
+
+ size += (size & 1);
+ if (avio_skip(pb, size) < 0)
+ break; // something is wrong here
}
the_end:
avio_seek(pb, pos, SEEK_SET);
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index 399d627121..544097a52b 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -220,8 +220,6 @@ static int vid_read_packet(AVFormatContext *s,
av_log(s, AV_LOG_ERROR, "unknown block (character = %c, decimal = %d, hex = %x)!!!\n",
block_type, block_type, block_type); return -1;
}
-
- return 0;
}
AVInputFormat ff_bethsoftvid_demuxer = {
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index b24ff1d023..70710319c5 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -29,6 +29,7 @@
#include "riff.h"
#include "isom.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "libavutil/dict.h"
#include "caf.h"
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index 13636f30ee..4156c49f7a 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -24,6 +24,7 @@
#include "riff.h"
#include "isom.h"
#include "avio_internal.h"
+#include "libavutil/intfloat_readwrite.h"
typedef struct {
int64_t data;
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 750c950df8..4cfe8fb500 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -32,6 +32,7 @@
#include "avformat.h"
#include "libavcodec/dvdata.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/mathematics.h"
#include "dv.h"
struct DVDemuxContext {
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 0b80835fae..0cbe7a5484 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -35,6 +35,7 @@
#include "libavcodec/dvdata.h"
#include "dv.h"
#include "libavutil/fifo.h"
+#include "libavutil/mathematics.h"
struct DVMuxContext {
const DVprofile* sys; /* current DV profile, e.g.: 525/60, 625/50 */
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index e776d0c384..f0832659d5 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
#include "ffm.h"
#if CONFIG_FFSERVER
diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index 8071045467..b3285b5c63 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
#include "ffm.h"
diff --git a/libavformat/ffmetadec.c b/libavformat/ffmetadec.c
index 0063e6eafa..4da9dfdaa6 100644
--- a/libavformat/ffmetadec.c
+++ b/libavformat/ffmetadec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/mathematics.h"
#include "avformat.h"
#include "ffmeta.h"
#include "internal.h"
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 4fb562f4e2..6d0f7d0cdc 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -26,6 +26,7 @@
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
+#include "libavutil/intfloat_readwrite.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/mpeg4audio.h"
#include "avformat.h"
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index cea0d02e3c..1a713413c0 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
#include "flv.h"
#include "internal.h"
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index 3f7d7851f7..da25ddcc2a 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/intfloat_readwrite.h"
+#include "libavutil/mathematics.h"
#include "avformat.h"
#include "gxf.h"
#include "riff.h"
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index cbf3b3ed8d..3d138d9972 100644
--- a/libavformat/idroqdec.c
+++ b/libavformat/idroqdec.c
@@ -209,7 +209,6 @@ static int roq_read_packet(AVFormatContext *s,
default:
av_log(s, AV_LOG_ERROR, " unknown RoQ chunk (%04X)\n", chunk_type);
return AVERROR_INVALIDDATA;
- break;
}
}
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 5636f78ec7..7c8eaf258a 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -155,14 +155,14 @@ void ff_put_v(AVIOContext *bc, uint64_t val);
/**
* Read a whole line of text from AVIOContext. Stop reading after reaching
- * either a \n, a \0 or EOF. The returned string is always \0 terminated,
+ * either a \\n, a \\0 or EOF. The returned string is always \\0-terminated,
* and may be truncated if the buffer is too small.
*
* @param s the read-only AVIOContext
* @param buf buffer to store the read line
* @param maxlen size of the buffer
* @return the length of the string written in the buffer, not including the
- * final \0
+ * final \\0
*/
int ff_get_line(AVIOContext *s, char *buf, int maxlen);
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index e9c977a59f..68a05c3895 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -28,6 +28,8 @@
#include "avlanguage.h"
#include "libavutil/samplefmt.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/random_seed.h"
#include "libavutil/lfg.h"
#include "libavutil/dict.h"
diff --git a/libavformat/mm.c b/libavformat/mm.c
index c6264f1cb7..d097139e46 100644
--- a/libavformat/mm.c
+++ b/libavformat/mm.c
@@ -184,8 +184,6 @@ static int read_packet(AVFormatContext *s,
avio_skip(pb, length);
}
}
-
- return 0;
}
AVInputFormat ff_mm_demuxer = {
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index a66e1d9ab2..029baed211 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -208,7 +208,6 @@ static int get_http_header_data(MMSHContext *mmsh)
}
}
}
- return 0;
}
static int mmsh_open(URLContext *h, const char *uri, int flags)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 773760c98a..651c685a39 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -26,6 +26,8 @@
//#define MOV_EXPORT_ALL_METADATA
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
#include "avformat.h"
@@ -2327,7 +2329,6 @@ static int mov_probe(AVProbeData *p)
return score;
}
}
- return score;
}
// must be done after parsing all trak because there's no order requirement
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index ebfcacb107..21a82b55d3 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -32,6 +32,8 @@
#include "libavcodec/put_bits.h"
#include "internal.h"
#include "libavutil/avstring.h"
+#include "libavutil/intfloat_readwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "rtpenc.h"
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 64f6ea8c0e..c2cb54c9af 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -22,6 +22,7 @@
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
+#include "libavutil/mathematics.h"
#include "avformat.h"
#include "id3v2.h"
#include "id3v1.h"
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 9c808d0f1e..1872114428 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/fifo.h"
+#include "libavutil/mathematics.h"
#include "libavcodec/put_bits.h"
#include "avformat.h"
#include "mpeg.h"
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 7e9647257f..a7e13e83d5 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -22,6 +22,7 @@
#include "libavutil/bswap.h"
#include "libavutil/crc.h"
#include "libavutil/dict.h"
+#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavcodec/mpegvideo.h"
#include "avformat.h"
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 8548c792f6..d7555f6f62 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -46,6 +46,7 @@
//#define DEBUG
#include "libavutil/aes.h"
+#include "libavutil/mathematics.h"
#include "libavcodec/bytestream.h"
#include "avformat.h"
#include "mxf.h"
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 4898187f3a..829393fcf0 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -18,6 +18,8 @@
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
+#include "libavutil/mathematics.h"
#include "avformat.h"
#include "riff.h"
#include "libavutil/dict.h"
diff --git a/libavformat/nut.c b/libavformat/nut.c
index c31f53a189..2a5e6fe567 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/mathematics.h"
#include "libavutil/tree.h"
#include "nut.h"
#include "internal.h"
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 7aecf73b73..9939b29c50 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -24,6 +24,7 @@
#include "libavutil/avstring.h"
#include "libavutil/bswap.h"
#include "libavutil/dict.h"
+#include "libavutil/mathematics.h"
#include "libavutil/tree.h"
#include "avio_internal.h"
#include "nut.h"
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 6ec9bcd8fd..9fa8b9ea33 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/tree.h"
#include "libavutil/dict.h"
#include "libavcodec/mpegaudiodata.h"
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index a75f1d6d7f..86a3322469 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
#include "riff.h"
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 5d1f320351..f93eb72cbd 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -21,6 +21,7 @@
#include "libavutil/crc.h"
#include "libavutil/opt.h"
+#include "libavutil/mathematics.h"
#include "libavutil/random_seed.h"
#include "libavcodec/xiph.h"
#include "libavcodec/bytestream.h"
diff --git a/libavformat/oma.c b/libavformat/oma.c
index aac96d14e5..633f0995c6 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -149,7 +149,6 @@ static int oma_read_header(AVFormatContext *s,
default:
av_log(s, AV_LOG_ERROR, "Unsupported codec %d!\n",buf[32]);
return -1;
- break;
}
st->codec->block_align = framesize;
diff --git a/libavformat/pcm.c b/libavformat/pcm.c
index def183c5b2..d66be59ccb 100644
--- a/libavformat/pcm.c
+++ b/libavformat/pcm.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/mathematics.h"
#include "avformat.h"
#include "pcm.h"
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index 744ae94459..34ba3c8880 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -234,7 +234,6 @@ static int str_read_packet(AVFormatContext *s,
pkt->stream_index =
str->channels[channel].audio_stream_index;
return 0;
- break;
default:
av_log(s, AV_LOG_WARNING, "Unknown sector type %02X\n", sector[0x12]);
/* drop the sector and move on */
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index af74a9ee56..83d823d746 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -23,6 +23,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
+#include "libavutil/mathematics.h"
#include "avformat.h"
typedef struct {
diff --git a/libavformat/riff.c b/libavformat/riff.c
index acac938187..060eaa0728 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/mathematics.h"
#include "libavcodec/avcodec.h"
#include "avformat.h"
#include "avio_internal.h"
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index e41406791e..3a4f552023 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -34,6 +34,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/mathematics.h"
#include "avformat.h"
#define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr, palette
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c
index 4b6d549f74..7e2ccdc6ac 100644
--- a/libavformat/rtmppkt.c
+++ b/libavformat/rtmppkt.c
@@ -21,6 +21,7 @@
#include "libavcodec/bytestream.h"
#include "libavutil/avstring.h"
+#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
#include "rtmppkt.h"
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index b8714c9ffa..e3fce2e1fa 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -26,6 +26,7 @@
#include "libavcodec/bytestream.h"
#include "libavutil/avstring.h"
+#include "libavutil/intfloat_readwrite.h"
#include "libavutil/lfg.h"
#include "libavutil/sha.h"
#include "avformat.h"
@@ -761,7 +762,6 @@ static int get_packet(URLContext *s, int for_header)
}
ff_rtmp_packet_destroy(&rpkt);
}
- return 0;
}
static int rtmp_close(URLContext *h)
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 9fc30d7b66..995f3bffd4 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/mathematics.h"
#include "libavcodec/get_bits.h"
#include "avformat.h"
#include "mpegts.h"
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 60629b098b..2c56eb22e1 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -22,6 +22,7 @@
#include "avformat.h"
#include "mpegts.h"
#include "internal.h"
+#include "libavutil/mathematics.h"
#include "libavutil/random_seed.h"
#include "libavutil/opt.h"
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index e8a0cd8198..7dd18fa151 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -22,6 +22,7 @@
#include "libavutil/base64.h"
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/parseutils.h"
#include "libavutil/random_seed.h"
#include "libavutil/dict.h"
@@ -428,11 +429,6 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
}
}
-/**
- * Parse the sdp description and allocate the rtp streams and the
- * pollfd array used for udp ones.
- */
-
int ff_sdp_parse(AVFormatContext *s, const char *content)
{
RTSPState *rt = s->priv_data;
@@ -1050,9 +1046,6 @@ retry:
return 0;
}
-/**
- * @return 0 on success, <0 on error, 1 if protocol is unavailable.
- */
int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
int lower_transport, const char *real_challenge)
{
@@ -1078,7 +1071,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
for (j = RTSP_RTP_PORT_MIN, i = 0; i < rt->nb_rtsp_streams; ++i) {
char transport[2048];
- /**
+ /*
* WMS serves all UDP data over a single connection, the RTX, which
* isn't necessarily the first in the SDP but has to be the first
* to be set up, else the second/third SETUP will fail with a 461.
@@ -1151,7 +1144,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
/* RTP/TCP */
else if (lower_transport == RTSP_LOWER_TRANSPORT_TCP) {
- /** For WMS streams, the application streams are only used for
+ /* For WMS streams, the application streams are only used for
* UDP. When trying to set it up for TCP streams, the server
* will return an error. Therefore, we skip those streams. */
if (rt->server_type == RTSP_SERVER_WMS &&
@@ -1482,14 +1475,14 @@ redirect:
cmd[0] = 0;
if (rt->server_type == RTSP_SERVER_REAL)
av_strlcat(cmd,
- /**
+ /*
* The following entries are required for proper
* streaming from a Realmedia server. They are
* interdependent in some way although we currently
* don't quite understand how. Values were copied
* from mplayer SVN r23589.
- * @param CompanyID is a 16-byte ID in base64
- * @param ClientChallenge is a 16-byte ID in hex
+ * ClientChallenge is a 16-byte ID in hex
+ * CompanyID is a 16-byte ID in base64
*/
"ClientChallenge: 9e26d33f2984236010ef6253fb1887f7\r\n"
"PlayerStarttime: [28/03/2003:22:50:23 00:00]\r\n"
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index 6b060923e4..f5cf823de3 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -505,8 +505,9 @@ int ff_rtsp_setup_input_streams(AVFormatContext *s, RTSPMessageHeader *reply);
int ff_rtsp_setup_output_streams(AVFormatContext *s, const char *addr);
/**
- * Parse a SDP description of streams by populating an RTSPState struct
- * within the AVFormatContext.
+ * Parse an SDP description of streams by populating an RTSPState struct
+ * within the AVFormatContext; also allocate the RTP streams and the
+ * pollfd array used for UDP streams.
*/
int ff_sdp_parse(AVFormatContext *s, const char *content);
@@ -525,6 +526,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt);
/**
* Do the SETUP requests for each stream for the chosen
* lower transport mode.
+ * @return 0 on success, <0 on error, 1 if protocol is unavailable
*/
int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
int lower_transport, const char *real_challenge);
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index cf95915110..b931e49a08 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -21,6 +21,7 @@
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
diff --git a/libavformat/seek.c b/libavformat/seek.c
index dd6109b68c..65211bfacf 100644
--- a/libavformat/seek.c
+++ b/libavformat/seek.c
@@ -21,6 +21,7 @@
*/
#include "seek.h"
+#include "libavutil/mathematics.h"
#include "libavutil/mem.h"
#include "internal.h"
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c
index 16d26ab4a7..2315b04877 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/soxdec.c
@@ -30,6 +30,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
#include "pcm.h"
diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c
index a07a2068c3..309db75a82 100644
--- a/libavformat/soxenc.c
+++ b/libavformat/soxenc.c
@@ -30,6 +30,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
#include "avio_internal.h"
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index f90564f3db..5aab001cbb 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -204,7 +204,6 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
skip:
avio_skip(pb, len);
}
- return 0;
}
AVInputFormat ff_swf_demuxer = {
diff --git a/libavformat/thp.c b/libavformat/thp.c
index 2d1f74e38b..c40be1fdc4 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
typedef struct ThpDemuxContext {
diff --git a/libavformat/utils.c b/libavformat/utils.c
index cfc70ecced..989ddaca07 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -32,6 +32,7 @@
#include "metadata.h"
#include "id3v2.h"
#include "libavutil/avstring.h"
+#include "libavutil/mathematics.h"
#include "riff.h"
#include "audiointerleave.h"
#include "url.h"
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index e06f39349b..7031d03e21 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -22,6 +22,7 @@
#include "avformat.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
+#include "libavutil/mathematics.h"
typedef struct VqfContext {
int frame_bit_len;
diff --git a/libavformat/wav.c b/libavformat/wav.c
index c5dbd631b4..f09e676ce0 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -22,6 +22,8 @@
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
+#include "libavutil/mathematics.h"
#include "avformat.h"
#include "avio_internal.h"
#include "pcm.h"
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index eb2eae1c9c..08bcffa36b 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -152,7 +152,6 @@ static int wc3_read_header(AVFormatContext *s,
(uint8_t)fourcc_tag, (uint8_t)(fourcc_tag >> 8), (uint8_t)(fourcc_tag >> 16), (uint8_t)(fourcc_tag >> 24),
(uint8_t)fourcc_tag, (uint8_t)(fourcc_tag >> 8), (uint8_t)(fourcc_tag >> 16), (uint8_t)(fourcc_tag >> 24));
return AVERROR_INVALIDDATA;
- break;
}
fourcc_tag = avio_rl32(pb);
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 5fe7e9fe12..816fb908fa 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -716,7 +716,7 @@ enum {
* Parse WTV chunks
* @param mode SEEK_TO_DATA or SEEK_TO_PTS
* @param seekts timestamp
- * @param[out] len Length of data chunk
+ * @param[out] len_ptr Length of data chunk
* @return stream index of data chunk, or <0 on error
*/
static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_ptr)