[Ffmpeg-cvslog] CVS: ffmpeg/libavformat flvenc.c, 1.17, 1.18 flvdec.c, 1.21, 1.22 avio.h, 1.20, 1.21 aviobuf.c, 1.28, 1.29 mov.c, 1.89, 1.90
Michael Niedermayer CVS
michael
Tue Jul 19 16:41:11 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv22433
Modified Files:
flvenc.c flvdec.c avio.h aviobuf.c mov.c
Log Message:
kill duplicated get/put_be24()
Index: flvenc.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/flvenc.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- flvenc.c 17 Jul 2005 22:24:35 -0000 1.17
+++ flvenc.c 19 Jul 2005 14:41:08 -0000 1.18
@@ -27,13 +27,6 @@
int reserved;
} FLVContext;
-static void put_be24(ByteIOContext *pb, int value)
-{
- put_byte(pb, (value>>16) & 0xFF );
- put_byte(pb, (value>> 8) & 0xFF );
- put_byte(pb, (value>> 0) & 0xFF );
-}
-
static int get_audio_flags(AVCodecContext *enc){
int flags = (enc->bits_per_sample == 16) ? 0x2 : 0x0;
@@ -52,6 +45,7 @@
flags |= 0x00;
break;
default:
+ av_log(enc, AV_LOG_ERROR, "flv doesnt support that sample rate, choose from (44100, 22050, 11025)\n");
return -1;
}
@@ -75,6 +69,7 @@
flags |= enc->codec_tag<<4;
break;
default:
+ av_log(enc, AV_LOG_ERROR, "codec not compatible with flv\n");
return -1;
}
Index: flvdec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/flvdec.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- flvdec.c 19 Jul 2005 14:26:41 -0000 1.21
+++ flvdec.c 19 Jul 2005 14:41:08 -0000 1.22
@@ -18,15 +18,6 @@
*/
#include "avformat.h"
-unsigned int get_be24(ByteIOContext *s)
-{
- unsigned int val;
- val = get_byte(s) << 16;
- val |= get_byte(s) << 8;
- val |= get_byte(s);
- return val;
-}
-
static int flv_probe(AVProbeData *p)
{
const uint8_t *d;
Index: avio.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/avio.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- avio.h 30 May 2005 16:45:08 -0000 1.20
+++ avio.h 19 Jul 2005 14:41:08 -0000 1.21
@@ -99,6 +99,7 @@
void put_be64(ByteIOContext *s, uint64_t val);
void put_le32(ByteIOContext *s, unsigned int val);
void put_be32(ByteIOContext *s, unsigned int val);
+void put_be24(ByteIOContext *s, unsigned int val);
void put_le16(ByteIOContext *s, unsigned int val);
void put_be16(ByteIOContext *s, unsigned int val);
void put_tag(ByteIOContext *s, const char *tag);
@@ -134,6 +135,7 @@
double get_be64_double(ByteIOContext *s);
char *get_strz(ByteIOContext *s, char *buf, int maxlen);
unsigned int get_be16(ByteIOContext *s);
+unsigned int get_be24(ByteIOContext *s);
unsigned int get_be32(ByteIOContext *s);
uint64_t get_be64(ByteIOContext *s);
Index: aviobuf.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/aviobuf.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- aviobuf.c 3 Jun 2005 08:48:10 -0000 1.28
+++ aviobuf.c 19 Jul 2005 14:41:08 -0000 1.29
@@ -253,6 +253,12 @@
put_byte(s, val);
}
+void put_be24(ByteIOContext *s, unsigned int val)
+{
+ put_be16(s, val >> 8);
+ put_byte(s, val);
+}
+
void put_tag(ByteIOContext *s, const char *tag)
{
while (*tag) {
@@ -407,10 +413,8 @@
unsigned int get_le32(ByteIOContext *s)
{
unsigned int val;
- val = get_byte(s);
- val |= get_byte(s) << 8;
- val |= get_byte(s) << 16;
- val |= get_byte(s) << 24;
+ val = get_le16(s);
+ val |= get_le16(s) << 16;
return val;
}
@@ -430,15 +434,20 @@
return val;
}
-unsigned int get_be32(ByteIOContext *s)
+unsigned int get_be24(ByteIOContext *s)
{
unsigned int val;
- val = get_byte(s) << 24;
- val |= get_byte(s) << 16;
- val |= get_byte(s) << 8;
+ val = get_be16(s) << 8;
val |= get_byte(s);
return val;
}
+unsigned int get_be32(ByteIOContext *s)
+{
+ unsigned int val;
+ val = get_be16(s) << 16;
+ val |= get_be16(s);
+ return val;
+}
double get_be64_double(ByteIOContext *s)
{
Index: mov.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/mov.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- mov.c 17 Jul 2005 22:24:35 -0000 1.89
+++ mov.c 19 Jul 2005 14:41:08 -0000 1.90
@@ -550,15 +550,6 @@
return len;
}
-static inline unsigned int get_be24(ByteIOContext *s)
-{
- unsigned int val;
- val = get_byte(s) << 16;
- val |= get_byte(s) << 8;
- val |= get_byte(s);
- return val;
-}
-
static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
More information about the ffmpeg-cvslog
mailing list