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

Issue 1657023002: Implement NullVideoDecoder to avoid crash on unsupported decoders. (Closed)

Created:
4 years, 10 months ago by joachim
Modified:
4 years, 10 months ago
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, rwolff_gocast.it, video-team_agora.io, yujie_mao (webrtc), zhengzhonghou_agora.io, stefan-webrtc, tterriberry_mozilla.com, qiang.lu, niklas.enbom, andresp, peah-webrtc, the sun, pbos-webrtc, perkj_webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Implement NullVideoDecoder to avoid crash on unsupported decoders. There is a use case with external codec factories that only support encoding but not decoding for a given type. This leads to a crash due to null being registered as codec (after a DCHECK). This CL adds a NullVideoDecoder that is used instead of the null to not crash but log to LS_ERROR. BUG=webrtc:5249 Committed: https://crrev.com/e03ac51aa16f9aa9902493d61fedacbe05734eba Cr-Commit-Position: refs/heads/master@{#11475}

Patch Set 1 #

Patch Set 2 : Removed DCHECK / NOTREACHED. #

Total comments: 4

Patch Set 3 : Feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -6 lines) Patch
M talk/media/webrtc/webrtcvideoengine2.cc View 1 1 chunk +3 lines, -4 lines 0 comments Download
M webrtc/video/video_decoder.cc View 1 2 2 chunks +38 lines, -2 lines 0 comments Download
M webrtc/video_decoder.h View 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
joachim
Ptal, do you have some suggestions how I could write tests for that?
4 years, 10 months ago (2016-02-01 22:37:16 UTC) #2
pbos-webrtc
+R noahric@, since you guys needed this, can you take a look and see if ...
4 years, 10 months ago (2016-02-02 13:50:33 UTC) #4
pbos-webrtc
https://codereview.webrtc.org/1657023002/diff/20001/webrtc/video/video_decoder.cc File webrtc/video/video_decoder.cc (right): https://codereview.webrtc.org/1657023002/diff/20001/webrtc/video/video_decoder.cc#newcode30 webrtc/video/video_decoder.cc:30: return new NullVideoDecoder(); I'd prefer a log here as ...
4 years, 10 months ago (2016-02-02 13:59:14 UTC) #5
noahric
Cool, LGTM. https://codereview.webrtc.org/1657023002/diff/20001/webrtc/video/video_decoder.cc File webrtc/video/video_decoder.cc (right): https://codereview.webrtc.org/1657023002/diff/20001/webrtc/video/video_decoder.cc#newcode181 webrtc/video/video_decoder.cc:181: return "null"; Maybe NullVideoDecoder, so the logging ...
4 years, 10 months ago (2016-02-02 14:06:44 UTC) #6
pbos-webrtc
lgtm with Noah's comment fixed.
4 years, 10 months ago (2016-02-02 14:11:15 UTC) #7
joachim
All done, thanks https://codereview.webrtc.org/1657023002/diff/20001/webrtc/video/video_decoder.cc File webrtc/video/video_decoder.cc (right): https://codereview.webrtc.org/1657023002/diff/20001/webrtc/video/video_decoder.cc#newcode30 webrtc/video/video_decoder.cc:30: return new NullVideoDecoder(); On 2016/02/02 13:59:13, ...
4 years, 10 months ago (2016-02-02 14:31:33 UTC) #8
pbos-webrtc
lgtm
4 years, 10 months ago (2016-02-02 14:32:52 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1657023002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1657023002/40001
4 years, 10 months ago (2016-02-02 14:36:33 UTC) #12
joachim
@mflodman: ptal for owner review of webrtc/video_decoder.h
4 years, 10 months ago (2016-02-02 14:56:10 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/3192)
4 years, 10 months ago (2016-02-02 15:07:07 UTC) #16
joachim
On 2016/02/02 14:56:10, joachim wrote: > @mflodman: ptal for owner review of webrtc/video_decoder.h mflodman, ping
4 years, 10 months ago (2016-02-03 13:10:05 UTC) #17
mflodman
LGTM
4 years, 10 months ago (2016-02-03 13:35:23 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1657023002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1657023002/40001
4 years, 10 months ago (2016-02-03 13:47:09 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-03 13:51:53 UTC) #21
commit-bot: I haz the power
4 years, 10 months ago (2016-02-03 13:52:03 UTC) #23
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e03ac51aa16f9aa9902493d61fedacbe05734eba
Cr-Commit-Position: refs/heads/master@{#11475}

Powered by Google App Engine
This is Rietveld 408576698