Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1332)

Side by Side Diff: source/patched-ffmpeg-mt/libavcodec/svq3.c

Issue 2850032: ffmpeg update to june 23 version which fixes mp4 crash on still frames with 3... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/sbr.h ('k') | source/patched-ffmpeg-mt/libavcodec/vp3.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2003 The FFmpeg Project 2 * Copyright (c) 2003 The FFmpeg Project
3 * 3 *
4 * This file is part of FFmpeg. 4 * This file is part of FFmpeg.
5 * 5 *
6 * FFmpeg is free software; you can redistribute it and/or 6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version. 9 * version 2.1 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 h->unknown_svq3_flag = get_bits1(&gb); 879 h->unknown_svq3_flag = get_bits1(&gb);
880 avctx->has_b_frames = !s->low_delay; 880 avctx->has_b_frames = !s->low_delay;
881 if (h->unknown_svq3_flag) { 881 if (h->unknown_svq3_flag) {
882 #if CONFIG_ZLIB 882 #if CONFIG_ZLIB
883 unsigned watermark_width = svq3_get_ue_golomb(&gb); 883 unsigned watermark_width = svq3_get_ue_golomb(&gb);
884 unsigned watermark_height = svq3_get_ue_golomb(&gb); 884 unsigned watermark_height = svq3_get_ue_golomb(&gb);
885 int u1 = svq3_get_ue_golomb(&gb); 885 int u1 = svq3_get_ue_golomb(&gb);
886 int u2 = get_bits(&gb, 8); 886 int u2 = get_bits(&gb, 8);
887 int u3 = get_bits(&gb, 2); 887 int u3 = get_bits(&gb, 2);
888 int u4 = svq3_get_ue_golomb(&gb); 888 int u4 = svq3_get_ue_golomb(&gb);
889 unsigned buf_len = watermark_width*watermark_height*4; 889 unsigned long buf_len = watermark_width*watermark_height*4;
890 int offset = (get_bits_count(&gb)+7)>>3; 890 int offset = (get_bits_count(&gb)+7)>>3;
891 uint8_t *buf; 891 uint8_t *buf;
892 892
893 if ((uint64_t)watermark_width*4 > UINT_MAX/watermark_height) 893 if ((uint64_t)watermark_width*4 > UINT_MAX/watermark_height)
894 return -1; 894 return -1;
895 895
896 buf = av_malloc(buf_len); 896 buf = av_malloc(buf_len);
897 av_log(avctx, AV_LOG_DEBUG, "watermark size: %dx%d\n", watermark _width, watermark_height); 897 av_log(avctx, AV_LOG_DEBUG, "watermark size: %dx%d\n", watermark _width, watermark_height);
898 av_log(avctx, AV_LOG_DEBUG, "u1: %x u2: %x u3: %x compressed dat a size: %d offset: %d\n", u1, u2, u3, u4, offset); 898 av_log(avctx, AV_LOG_DEBUG, "u1: %x u2: %x u3: %x compressed dat a size: %d offset: %d\n", u1, u2, u3, u4, offset);
899 if (uncompress(buf, (uLong*)&buf_len, extradata + 8 + offset, si ze - offset) != Z_OK) { 899 if (uncompress(buf, &buf_len, extradata + 8 + offset, size - off set) != Z_OK) {
900 av_log(avctx, AV_LOG_ERROR, "could not uncompress watermark logo\n"); 900 av_log(avctx, AV_LOG_ERROR, "could not uncompress watermark logo\n");
901 av_free(buf); 901 av_free(buf);
902 return -1; 902 return -1;
903 } 903 }
904 h->svq3_watermark_key = ff_svq1_packet_checksum(buf, buf_len, 0) ; 904 h->svq3_watermark_key = ff_svq1_packet_checksum(buf, buf_len, 0) ;
905 h->svq3_watermark_key = h->svq3_watermark_key << 16 | h->svq3_wa termark_key; 905 h->svq3_watermark_key = h->svq3_watermark_key << 16 | h->svq3_wa termark_key;
906 av_log(avctx, AV_LOG_DEBUG, "watermark key %#x\n", h->svq3_water mark_key); 906 av_log(avctx, AV_LOG_DEBUG, "watermark key %#x\n", h->svq3_water mark_key);
907 av_free(buf); 907 av_free(buf);
908 #else 908 #else
909 av_log(avctx, AV_LOG_ERROR, "this svq3 file contains watermark w hich need zlib support compiled in\n"); 909 av_log(avctx, AV_LOG_ERROR, "this svq3 file contains watermark w hich need zlib support compiled in\n");
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 CODEC_ID_SVQ3, 1075 CODEC_ID_SVQ3,
1076 sizeof(H264Context), 1076 sizeof(H264Context),
1077 svq3_decode_init, 1077 svq3_decode_init,
1078 NULL, 1078 NULL,
1079 ff_h264_decode_end, 1079 ff_h264_decode_end,
1080 svq3_decode_frame, 1080 svq3_decode_frame,
1081 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_DELAY, 1081 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_DELAY,
1082 .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Vi deo 3 / SVQ3"), 1082 .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Vi deo 3 / SVQ3"),
1083 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_NONE}, 1083 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_NONE},
1084 }; 1084 };
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/sbr.h ('k') | source/patched-ffmpeg-mt/libavcodec/vp3.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698