[FFmpeg-cvslog] r23364 - in trunk/libavcodec: h264.h h264_parser.c
hyc
subversion
Fri May 28 22:14:15 CEST 2010
Author: hyc
Date: Fri May 28 22:14:14 2010
New Revision: 23364
Log:
Cleanup prev commit, flag variable should start with 0
Modified:
trunk/libavcodec/h264.h
trunk/libavcodec/h264_parser.c
Modified: trunk/libavcodec/h264.h
==============================================================================
--- trunk/libavcodec/h264.h Fri May 28 20:50:39 2010 (r23363)
+++ trunk/libavcodec/h264.h Fri May 28 22:14:14 2010 (r23364)
@@ -464,8 +464,8 @@ typedef struct H264Context{
*/
int is_avc; ///< this flag is != 0 if codec is avc1
int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4)
+ int got_first; ///< this flag is != 0 if we've parsed a frame
- int first_picture;
SPS *sps_buffers[MAX_SPS_COUNT];
PPS *pps_buffers[MAX_PPS_COUNT];
Modified: trunk/libavcodec/h264_parser.c
==============================================================================
--- trunk/libavcodec/h264_parser.c Fri May 28 20:50:39 2010 (r23363)
+++ trunk/libavcodec/h264_parser.c Fri May 28 22:14:14 2010 (r23364)
@@ -245,8 +245,8 @@ static int h264_parse(AVCodecParserConte
ParseContext *pc = &h->s.parse_context;
int next;
- if (h->first_picture) {
- h->first_picture = 0;
+ if (!h->got_first) {
+ h->got_first = 1;
if (avctx->extradata_size) {
h->s.avctx = avctx;
ff_h264_decode_extradata(h);
@@ -327,7 +327,6 @@ static int init(AVCodecParserContext *s)
{
H264Context *h = s->priv_data;
h->thread_context[0] = h;
- h->first_picture = 1;
return 0;
}
More information about the ffmpeg-cvslog
mailing list