X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmpegvideo_parser.c;h=9688e1862548c7394f54083ca050e254ee656253;hb=5dd045ebc11933dca4d6af06e6b1e62be56802f7;hp=28ed590320b3e9a662d1d38abe391dc218dd3b65;hpb=7debef33f8fb38ade91d88b2caceed41ebc60cbf;p=ffmpeg diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index 28ed590320b..9688e186254 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -3,20 +3,20 @@ * Copyright (c) 2000,2001 Fabrice Bellard * Copyright (c) 2002-2004 Michael Niedermayer * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav 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. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav 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 FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -32,7 +32,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, uint32_t start_code; int frame_rate_index, ext_type, bytes_left; int frame_rate_ext_n, frame_rate_ext_d; - int picture_structure, top_field_first, repeat_first_field, progressive_frame; + int top_field_first, repeat_first_field, progressive_frame; int horiz_size_ext, vert_size_ext, bit_rate_ext; int did_set_size=0; //FIXME replace the crap with get_bits() @@ -91,7 +91,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, break; case 0x8: /* picture coding extension */ if (bytes_left >= 5) { - picture_structure = buf[2]&3; top_field_first = buf[3] & (1 << 7); repeat_first_field = buf[3] & (1 << 1); progressive_frame = buf[4] & (1 << 7); @@ -152,10 +151,8 @@ static int mpegvideo_parse(AVCodecParserContext *s, to have the full timing information. The time take by this function should be negligible for uncorrupted streams */ mpegvideo_extract_headers(s, avctx, buf, buf_size); -#if 0 - printf("pict_type=%d frame_rate=%0.3f repeat_pict=%d\n", - s->pict_type, (double)avctx->time_base.den / avctx->time_base.num, s->repeat_pict); -#endif + av_dlog(NULL, "pict_type=%d frame_rate=%0.3f repeat_pict=%d\n", + s->pict_type, (double)avctx->time_base.den / avctx->time_base.num, s->repeat_pict); *poutbuf = buf; *poutbuf_size = buf_size; @@ -176,10 +173,11 @@ static int mpegvideo_split(AVCodecContext *avctx, return 0; } -AVCodecParser mpegvideo_parser = { +AVCodecParser ff_mpegvideo_parser = { { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO }, sizeof(ParseContext1), NULL, mpegvideo_parse, ff_parse1_close, + mpegvideo_split, };