OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 | 930 |
931 if (corrupted) { | 931 if (corrupted) { |
932 if (ctx->frame_workers) { | 932 if (ctx->frame_workers) { |
933 VP9Worker *const worker = ctx->frame_workers; | 933 VP9Worker *const worker = ctx->frame_workers; |
934 FrameWorkerData *const frame_worker_data = | 934 FrameWorkerData *const frame_worker_data = |
935 (FrameWorkerData *)worker->data1; | 935 (FrameWorkerData *)worker->data1; |
936 RefCntBuffer *const frame_bufs = | 936 RefCntBuffer *const frame_bufs = |
937 frame_worker_data->pbi->common.buffer_pool->frame_bufs; | 937 frame_worker_data->pbi->common.buffer_pool->frame_bufs; |
938 if (frame_worker_data->pbi->common.frame_to_show == NULL) | 938 if (frame_worker_data->pbi->common.frame_to_show == NULL) |
939 return VPX_CODEC_ERROR; | 939 return VPX_CODEC_ERROR; |
940 *corrupted = frame_bufs[ctx->last_show_frame].buf.corrupted; | 940 if (ctx->last_show_frame >= 0) |
| 941 *corrupted = frame_bufs[ctx->last_show_frame].buf.corrupted; |
941 return VPX_CODEC_OK; | 942 return VPX_CODEC_OK; |
942 } else { | 943 } else { |
943 return VPX_CODEC_ERROR; | 944 return VPX_CODEC_ERROR; |
944 } | 945 } |
945 } | 946 } |
946 | 947 |
947 return VPX_CODEC_INVALID_PARAM; | 948 return VPX_CODEC_INVALID_PARAM; |
948 } | 949 } |
949 | 950 |
950 static vpx_codec_err_t ctrl_get_frame_size(vpx_codec_alg_priv_t *ctx, | 951 static vpx_codec_err_t ctrl_get_frame_size(vpx_codec_alg_priv_t *ctx, |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 0, | 1106 0, |
1106 NULL, // vpx_codec_enc_cfg_map_t | 1107 NULL, // vpx_codec_enc_cfg_map_t |
1107 NULL, // vpx_codec_encode_fn_t | 1108 NULL, // vpx_codec_encode_fn_t |
1108 NULL, // vpx_codec_get_cx_data_fn_t | 1109 NULL, // vpx_codec_get_cx_data_fn_t |
1109 NULL, // vpx_codec_enc_config_set_fn_t | 1110 NULL, // vpx_codec_enc_config_set_fn_t |
1110 NULL, // vpx_codec_get_global_headers_fn_t | 1111 NULL, // vpx_codec_get_global_headers_fn_t |
1111 NULL, // vpx_codec_get_preview_frame_fn_t | 1112 NULL, // vpx_codec_get_preview_frame_fn_t |
1112 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t | 1113 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t |
1113 } | 1114 } |
1114 }; | 1115 }; |
OLD | NEW |