# HG changeset patch # User hyc # Date 1275077654 0 # Node ID 51abd780bda60e80e0b7055f17154d7908b14a2d # Parent f918fb753b31ffca473c12b2764fe925b680ab29 Cleanup prev commit, flag variable should start with 0 diff -r f918fb753b31 -r 51abd780bda6 h264.h --- a/h264.h Fri May 28 18:50:39 2010 +0000 +++ b/h264.h Fri May 28 20:14:14 2010 +0000 @@ -464,8 +464,8 @@ */ 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]; diff -r f918fb753b31 -r 51abd780bda6 h264_parser.c --- a/h264_parser.c Fri May 28 18:50:39 2010 +0000 +++ b/h264_parser.c Fri May 28 20:14:14 2010 +0000 @@ -245,8 +245,8 @@ 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 @@ { H264Context *h = s->priv_data; h->thread_context[0] = h; - h->first_picture = 1; return 0; }