[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec parser.c, 1.26, 1.27 avcodec.h, 1.412, 1.413
Michael Niedermayer CVS
michael
Mon Aug 15 17:58:23 CEST 2005
- Previous message: [Ffmpeg-cvslog] CVS: ffmpeg ffmpeg.c, 1.341, 1.342 ffplay.c, 1.49, 1.50
- Next message: [Ffmpeg-cvslog] CVS: ffmpeg/libavformat utils.c, 1.163, 1.164 avformat.h, 1.130, 1.131 avidec.c, 1.74, 1.75
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv27285/libavcodec
Modified Files:
parser.c avcodec.h
Log Message:
parse pict_type for streams in avi
fix mpeg4 parser so it outputs te pict_type
support header only parseing without repacking
Index: parser.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/parser.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- parser.c 29 Jun 2005 08:41:01 -0000 1.26
+++ parser.c 15 Aug 2005 15:58:20 -0000 1.27
@@ -429,13 +429,18 @@
ParseContext1 *pc1 = s->priv_data;
ParseContext *pc= &pc1->pc;
int next;
-
- next= ff_mpeg1_find_frame_end(pc, buf, buf_size);
-
- if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
- *poutbuf = NULL;
- *poutbuf_size = 0;
- return buf_size;
+
+ if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
+ next= buf_size;
+ }else{
+ next= ff_mpeg1_find_frame_end(pc, buf, buf_size);
+
+ if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
+ *poutbuf = NULL;
+ *poutbuf_size = 0;
+ return buf_size;
+ }
+
}
/* we have a full frame : we just parse the first few MPEG headers
to have the full timing information. The time take by this
@@ -506,6 +511,7 @@
if (s->width) {
avcodec_set_dimensions(avctx, s->width, s->height);
}
+ s1->pict_type= s->pict_type;
pc->first_picture = 0;
return ret;
}
@@ -529,12 +535,16 @@
ParseContext *pc = s->priv_data;
int next;
- next= ff_mpeg4_find_frame_end(pc, buf, buf_size);
-
- if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
- *poutbuf = NULL;
- *poutbuf_size = 0;
- return buf_size;
+ if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
+ next= buf_size;
+ }else{
+ next= ff_mpeg4_find_frame_end(pc, buf, buf_size);
+
+ if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
+ *poutbuf = NULL;
+ *poutbuf_size = 0;
+ return buf_size;
+ }
}
av_mpeg4_decode_header(s, avctx, buf, buf_size);
Index: avcodec.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/avcodec.h,v
retrieving revision 1.412
retrieving revision 1.413
diff -u -d -r1.412 -r1.413
--- avcodec.h 1 Aug 2005 20:07:03 -0000 1.412
+++ avcodec.h 15 Aug 2005 15:58:20 -0000 1.413
@@ -21,8 +21,8 @@
#define AV_STRINGIFY(s) AV_TOSTRING(s)
#define AV_TOSTRING(s) #s
-#define LIBAVCODEC_VERSION_INT ((49<<16)+(0<<8)+1)
-#define LIBAVCODEC_VERSION 49.0.1
+#define LIBAVCODEC_VERSION_INT ((49<<16)+(0<<8)+2)
+#define LIBAVCODEC_VERSION 49.0.2
#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
@@ -2324,6 +2324,9 @@
int64_t cur_frame_offset[AV_PARSER_PTS_NB];
int64_t cur_frame_pts[AV_PARSER_PTS_NB];
int64_t cur_frame_dts[AV_PARSER_PTS_NB];
+
+ int flags;
+#define PARSER_FLAG_COMPLETE_FRAMES 0x0001
} AVCodecParserContext;
typedef struct AVCodecParser {
- Previous message: [Ffmpeg-cvslog] CVS: ffmpeg ffmpeg.c, 1.341, 1.342 ffplay.c, 1.49, 1.50
- Next message: [Ffmpeg-cvslog] CVS: ffmpeg/libavformat utils.c, 1.163, 1.164 avformat.h, 1.130, 1.131 avidec.c, 1.74, 1.75
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ffmpeg-cvslog
mailing list