summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-03-31 12:47:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-03-31 12:48:41 +0200
commit1caa4123bd83f8b1f8a4e11a8d8539be7d54b105 (patch)
tree094ece3f8531095920978d68b65e7119ab7007e7 /libavformat/aviobuf.c
parent8b8bf89e52bc3bf4be1a9f10eb1eb153a443172f (diff)
parent229e2631be528c595650a7568c1d4df8af9c4944 (diff)
Merge remote-tracking branch 'newdev/master'
* newdev/master: rtsp: Use GET_PARAMETER for keep-alive for generic RTSP servers mlp_parse.c: set AVCodecContext channel_layout APIChanges: mark the place where 0.6 was branched. avio: make get_checksum() internal. avio: move ff_crc04C11DB7_update() from avio.h -> avio_internal.h avio: make init_checksum() internal. NOT MERGED Add MxPEG decoder NOT MERGED Add support for picture_ptr field in MJpegDecodeContext NOT MERGED Move MJPEG's input buffer preprocessing in separate public function NOT MERGED Support reference picture defined by bitmask in MJPEG's SOS decoder sndio bug fix Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 174df21b89..9ba82d3e94 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -415,6 +415,16 @@ int64_t av_url_read_fseek(AVIOContext *s, int stream_index,
{
return ffio_read_seek(s, stream_index, timestamp, flags);
}
+void init_checksum(AVIOContext *s,
+ unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
+ unsigned long checksum)
+{
+ ffio_init_checksum(s, update_checksum, checksum);
+}
+unsigned long get_checksum(AVIOContext *s)
+{
+ return ffio_get_checksum(s);
+}
#endif
int avio_put_str(AVIOContext *s, const char *str)
@@ -557,14 +567,14 @@ unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf,
return av_crc(av_crc_get_table(AV_CRC_32_IEEE), checksum, buf, len);
}
-unsigned long get_checksum(AVIOContext *s)
+unsigned long ffio_get_checksum(AVIOContext *s)
{
s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_ptr - s->checksum_ptr);
s->update_checksum= NULL;
return s->checksum;
}
-void init_checksum(AVIOContext *s,
+void ffio_init_checksum(AVIOContext *s,
unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
unsigned long checksum)
{