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

Issue 379983002: Fix AnnexB validation logic to work with encrypted content. (Closed)

Created:
6 years, 5 months ago by acolwell GONE FROM CHROMIUM
Modified:
6 years, 4 months ago
Reviewers:
xhwang, damienv1
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix AnnexB validation logic to work with encrypted content. AVC::IsValidAnnexB() would fail if encrypted sections happened to contain something that looked like an Annex B start code. This change updates the H264Parser so that it will skip byte sequences that look like start codes in the encrypted sections of the buffer. BUG=372617 TEST=AVCConversionTests updated to include fake start codes in the encrypted sections. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286373

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address CR comments. #

Patch Set 3 : Change method name and fix crash #

Total comments: 12

Patch Set 4 : Address CR comments and rebase #

Total comments: 2

Patch Set 5 : Address CR comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -38 lines) Patch
M media/filters/ffmpeg_demuxer_unittest.cc View 1 1 chunk +7 lines, -1 line 0 comments Download
M media/filters/h264_parser.h View 1 2 3 4 chunks +18 lines, -0 lines 0 comments Download
M media/filters/h264_parser.cc View 1 2 3 5 chunks +62 lines, -4 lines 0 comments Download
M media/formats/mp4/avc.h View 1 chunk +6 lines, -2 lines 0 comments Download
M media/formats/mp4/avc.cc View 1 3 4 5 chunks +9 lines, -8 lines 0 comments Download
M media/formats/mp4/avc_unittest.cc View 1 10 chunks +35 lines, -21 lines 0 comments Download
M media/formats/mp4/mp4_stream_parser.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
acolwell GONE FROM CHROMIUM
6 years, 5 months ago (2014-07-09 20:51:33 UTC) #1
xhwang
Looking pretty good. Thanks for fixing this! Just a few suggestions/nits. https://codereview.chromium.org/379983002/diff/1/media/filters/h264_parser.cc File media/filters/h264_parser.cc (right): ...
6 years, 5 months ago (2014-07-10 06:23:02 UTC) #2
xhwang
BTW, I just tested this CL with http://goo.gl/1oGQfZ and I am still seeing: [16134:16134:0714/140042:FATAL:mp4_stream_parser.cc(385)] Check ...
6 years, 5 months ago (2014-07-14 21:03:17 UTC) #3
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/379983002/diff/1/media/filters/h264_parser.cc File media/filters/h264_parser.cc (right): https://codereview.chromium.org/379983002/diff/1/media/filters/h264_parser.cc#newcode272 media/filters/h264_parser.cc:272: } while (*start_code_size == 0); On 2014/07/10 06:23:01, xhwang ...
6 years, 5 months ago (2014-07-15 22:10:44 UTC) #4
acolwell GONE FROM CHROMIUM
On 2014/07/14 21:03:17, xhwang wrote: > BTW, I just tested this CL with http://goo.gl/1oGQfZ and ...
6 years, 5 months ago (2014-07-15 22:45:29 UTC) #5
xhwang
The new code still seems complicated. I guess this is due to how FindStartCode() works. ...
6 years, 5 months ago (2014-07-16 05:06:13 UTC) #6
damienv1
I think the code could be a bit simpler. https://codereview.chromium.org/379983002/diff/40001/media/filters/h264_parser.cc File media/filters/h264_parser.cc (right): https://codereview.chromium.org/379983002/diff/40001/media/filters/h264_parser.cc#newcode250 media/filters/h264_parser.cc:250: ...
6 years, 5 months ago (2014-07-16 14:33:17 UTC) #7
acolwell GONE FROM CHROMIUM
On 2014/07/16 14:33:17, damienv1 wrote: > I think the code could be a bit simpler. ...
6 years, 5 months ago (2014-07-25 16:43:26 UTC) #8
xhwang
On 2014/07/25 16:43:26, acolwell wrote: > On 2014/07/16 14:33:17, damienv1 wrote: > > I think ...
6 years, 5 months ago (2014-07-25 17:04:24 UTC) #9
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/379983002/diff/40001/media/filters/h264_parser.cc File media/filters/h264_parser.cc (right): https://codereview.chromium.org/379983002/diff/40001/media/filters/h264_parser.cc#newcode156 media/filters/h264_parser.cc:156: const uint8* end = std::min(start + subsamples[i].clear_bytes, stream_end); On ...
6 years, 4 months ago (2014-07-28 19:43:12 UTC) #10
xhwang
lgtm, thanks! https://codereview.chromium.org/379983002/diff/60001/media/formats/mp4/avc.cc File media/formats/mp4/avc.cc (right): https://codereview.chromium.org/379983002/diff/60001/media/formats/mp4/avc.cc#newcode227 media/formats/mp4/avc.cc:227: extra line not needed?
6 years, 4 months ago (2014-07-29 18:28:53 UTC) #11
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/379983002/diff/60001/media/formats/mp4/avc.cc File media/formats/mp4/avc.cc (right): https://codereview.chromium.org/379983002/diff/60001/media/formats/mp4/avc.cc#newcode227 media/formats/mp4/avc.cc:227: On 2014/07/29 18:28:52, xhwang wrote: > extra line not ...
6 years, 4 months ago (2014-07-29 19:09:27 UTC) #12
acolwell GONE FROM CHROMIUM
The CQ bit was checked by acolwell@chromium.org
6 years, 4 months ago (2014-07-29 19:09:30 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/acolwell@chromium.org/379983002/80001
6 years, 4 months ago (2014-07-29 19:10:41 UTC) #14
commit-bot: I haz the power
6 years, 4 months ago (2014-07-30 01:25:38 UTC) #15
Message was sent while issue was closed.
Change committed as 286373

Powered by Google App Engine
This is Rietveld 408576698