diff options
author | Alexander Strange <astrange@ithinksw.com> | 2008-07-15 21:30:04 +0000 |
---|---|---|
committer | Alexander Strange <astrange@ithinksw.com> | 2008-07-15 21:30:04 +0000 |
commit | 64b9d48f765ff6bf6c6e41edf690c56a4e0cdb8b (patch) | |
tree | bec409271497df98e3c676bb652125d54df15f7b /libavcodec/h264.c | |
parent | deaab5fc32134ea53bff2ab46f95dd493ecf94c1 (diff) | |
download | ffmpeg-64b9d48f765ff6bf6c6e41edf690c56a4e0cdb8b.tar.gz |
Move the size of the H264Context delayed_pic array into a #define.
This improves readability by getting rid of some magic numbers.
Originally committed as revision 14248 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 4b69ca5920..a030959e3a 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3302,7 +3302,7 @@ static void idr(H264Context *h){ static void flush_dpb(AVCodecContext *avctx){ H264Context *h= avctx->priv_data; int i; - for(i=0; i<16; i++) { + for(i=0; i<MAX_DELAYED_PIC_COUNT; i++) { if(h->delayed_pic[i]) h->delayed_pic[i]->reference= 0; h->delayed_pic[i]= NULL; @@ -7836,7 +7836,7 @@ static int decode_frame(AVCodecContext *avctx, pics = 0; while(h->delayed_pic[pics]) pics++; - assert(pics+1 < sizeof(h->delayed_pic) / sizeof(h->delayed_pic[0])); + assert(pics <= MAX_DELAYED_PIC_COUNT); h->delayed_pic[pics++] = cur; if(cur->reference == 0) |