]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/aviobuf.c
Remove gif demuxer, the code contains a gif decoder and lzw decoder neither
[ffmpeg] / libavformat / aviobuf.c
index 45248a95ab50372e8cb6ac30ba80874b825ec45d..6206c66909c3ce2519a89a80d6e7a79b1e7d28d7 100644 (file)
  * 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/crc.h"
 #include "avformat.h"
 #include "avio.h"
-#include "crc.h"
 #include <stdarg.h>
 
 #define IO_BUFFER_SIZE 32768
@@ -60,6 +61,20 @@ int init_put_byte(ByteIOContext *s,
     return 0;
 }
 
+ByteIOContext *av_alloc_put_byte(
+                  unsigned char *buffer,
+                  int buffer_size,
+                  int write_flag,
+                  void *opaque,
+                  int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
+                  int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
+                  offset_t (*seek)(void *opaque, offset_t offset, int whence)) {
+    ByteIOContext *s = av_mallocz(sizeof(ByteIOContext));
+    init_put_byte(s, buffer, buffer_size, write_flag, opaque,
+                  read_packet, write_packet, seek);
+    return s;
+}
+
 static void flush_buffer(ByteIOContext *s)
 {
     if (s->buf_ptr > s->buffer) {
@@ -304,7 +319,7 @@ static void fill_buffer(ByteIOContext *s)
 }
 
 unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len){
-    return av_crc(av_crc04C11DB7, checksum, buf, len);
+    return av_crc(av_crc_get_table(AV_CRC_32_IEEE), checksum, buf, len);
 }
 
 unsigned long get_checksum(ByteIOContext *s){