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

Side by Side Diff: libavcodec/utils.c

Issue 9373002: Fix valgrind and asan memory leaks and crashes. (Closed) Base URL: ssh://gerrit.chromium.org:29418/chromium/third_party/ffmpeg.git@master
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | libavcodec/vorbisdec.c » ('j') | libavcodec/vp3.c » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * utils for libavcodec 2 * utils for libavcodec
3 * Copyright (c) 2001 Fabrice Bellard 3 * Copyright (c) 2001 Fabrice Bellard
4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> 4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 * 5 *
6 * This file is part of FFmpeg. 6 * This file is part of FFmpeg.
7 * 7 *
8 * FFmpeg is free software; you can redistribute it and/or 8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 } 879 }
880 880
881 avctx->pts_correction_num_faulty_pts = 881 avctx->pts_correction_num_faulty_pts =
882 avctx->pts_correction_num_faulty_dts = 0; 882 avctx->pts_correction_num_faulty_dts = 0;
883 avctx->pts_correction_last_pts = 883 avctx->pts_correction_last_pts =
884 avctx->pts_correction_last_dts = INT64_MIN; 884 avctx->pts_correction_last_dts = INT64_MIN;
885 885
886 if(avctx->codec->init && !(avctx->active_thread_type&FF_THREAD_FRAME)){ 886 if(avctx->codec->init && !(avctx->active_thread_type&FF_THREAD_FRAME)){
887 ret = avctx->codec->init(avctx); 887 ret = avctx->codec->init(avctx);
888 if (ret < 0) { 888 if (ret < 0) {
889 if(avctx->codec->close)
890 avctx->codec->close(avctx);
889 goto free_and_end; 891 goto free_and_end;
890 } 892 }
891 } 893 }
892 894
893 ret=0; 895 ret=0;
894 end: 896 end:
895 entangled_thread_counter--; 897 entangled_thread_counter--;
896 898
897 /* Release any user-supplied mutex. */ 899 /* Release any user-supplied mutex. */
898 if (ff_lockmgr_cb) { 900 if (ff_lockmgr_cb) {
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 else if (codec_id < CODEC_ID_FIRST_UNKNOWN) 1987 else if (codec_id < CODEC_ID_FIRST_UNKNOWN)
1986 return AVMEDIA_TYPE_SUBTITLE; 1988 return AVMEDIA_TYPE_SUBTITLE;
1987 1989
1988 return AVMEDIA_TYPE_UNKNOWN; 1990 return AVMEDIA_TYPE_UNKNOWN;
1989 } 1991 }
1990 1992
1991 int avcodec_is_open(AVCodecContext *s) 1993 int avcodec_is_open(AVCodecContext *s)
1992 { 1994 {
1993 return !!s->internal; 1995 return !!s->internal;
1994 } 1996 }
OLDNEW
« no previous file with comments | « no previous file | libavcodec/vorbisdec.c » ('j') | libavcodec/vp3.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698