diff options
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 8bc56973ed..5369c051c2 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -3,20 +3,20 @@ * Copyright (c) 2000, 2001 Fabrice Bellard * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -25,8 +25,13 @@ * MPEG-1/2 decoder */ +#define UNCHECKED_BITSTREAM_READER 1 + //#define DEBUG #include "libavutil/attributes.h" +#include "libavutil/avassert.h" +#include "libavutil/timecode.h" + #include "internal.h" #include "avcodec.h" #include "dsputil.h" @@ -40,8 +45,6 @@ #include "xvmc_internal.h" #include "thread.h" -//#undef NDEBUG -//#include <assert.h> uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; @@ -178,7 +181,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, */ for (i = 0; i < buf_size; i++) { - assert(pc->frame_start_found >= 0 && pc->frame_start_found <= 4); + av_assert1(pc->frame_start_found >= 0 && pc->frame_start_found <= 4); if (pc->frame_start_found & 1) { if (state == EXT_START_CODE && (buf[i] & 0xF0) != 0x80) pc->frame_start_found--; @@ -219,3 +222,4 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, pc->state = state; return END_NOT_FOUND; } + |