mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 22:00:47 +01:00

Previously, the use of pass-by-value caused an issue in ObjCVideoDecoder::Decode, where the EncodedImage was being copied upon calling initWithNativeEncodedImage, which then created an NSData using the copy's pointer; then the copy was destroyed, invalidating that pointer. Bug: webrtc:9378 Change-Id: Iac28b890c9902108ffc5ec54a607a99034159153 Reviewed-on: https://webrtc-review.googlesource.com/c/121922 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26598}
25 lines
767 B
Objective-C
25 lines
767 B
Objective-C
/*
|
|
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#import "base/RTCEncodedImage.h"
|
|
|
|
#include "api/video/encoded_image.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/* Interfaces for converting to/from internal C++ formats. */
|
|
@interface RTCEncodedImage (Private)
|
|
|
|
- (instancetype)initWithNativeEncodedImage:(const webrtc::EncodedImage &)encodedImage;
|
|
- (webrtc::EncodedImage)nativeEncodedImage;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|