Commit Graph

17 Commits

Author SHA1 Message Date
Tom Finegan
8e88e04b07 webm2pes: Avoid OOB reads caused by invalid superframe index.
BUG=webm:1492

Change-Id: Ibd5781731fe8f6fcdf5f1cc6e5807d17b3b92d4d
2018-02-02 07:06:43 -08:00
Tom Finegan
9fb774ab80 Add missing include in webm2pes.cc.
We need <algorithm> on some platforms.

Change-Id: I65fa3ad52265b05c4141e14d97d6de0af1649b29
2017-01-18 07:26:30 -08:00
Tom Finegan
639a4bc3b1 webm2pes: Remove debug printfs().
Change-Id: I13ba6590c63e7fef14efee812095ac704ef8b69e
2016-08-10 14:56:33 -07:00
Tom Finegan
9a51102cb5 webm2pes: fflush() in the correct conversion function.
Change-Id: I79db8b24178d4e7ba205995525b74a09efef8a04
2016-08-10 14:56:33 -07:00
Tom Finegan
dc7f15559f webm2pes: Track total bytes written.
Change-Id: I78807280cbd05f642215c83d5db4d04837c06438
2016-08-10 14:56:33 -07:00
Tom Finegan
6cf0a0f400 vpxpes_parser: Store frame payloads.
libwebm_util:
- Add 90khz -> nanosecond conversion.

vpxpes_parser:
- Get rid of VpxPesParser::VpxFrame and use VideoFrame.
- Store/Accumulate (when neccessary) PES payloads in
  VideoFrames.
- Change type of size constants from int to size_t.
- Return offset accounting for origin from FindStartCode().
- Check all PTS marker bits (instead of checking the second
  marker twice).

video_frame:
- Add nanosecond_pts mutator.

webm2pes:
- Write DTS/PTS presence flag correctly when PTS is not
  present.

Change-Id: I10f16cd03bb3a51205a25331527ddceb3769ba03
2016-08-08 11:14:03 -07:00
Tom Finegan
24be76dcb2 webm2pes: Replace VpxFrame with VideoFrame.
VideoFrame was created in order to get rid of the two
slightly different VpxFrame implementations. This patch
gets rid of Webm2Pes's version.

Change-Id: I5af29d5ca717121ee7ab30f28e42d2a43ea5abb0
2016-07-22 15:07:42 -07:00
Tom Finegan
e6415af941 webm2pes: Make WritePesPacket() a public method.
WritePesPacket() now takes a VpxFrame as input and a
PacketDataBuffer* as an output  parameter, and avoids
using members entirely. This facilitates deeper testing
of Webm2Pes without requiring friendship with test
classes and methods.

Change-Id: I076db8900cc1a5c864b54f5fe3403fb05b4bd835
2016-07-20 17:36:46 -07:00
Tom Finegan
8f840ddaa3 webm2pes: Move frame read out of PES packet write method.
Makes writing tests easier by allowing caller to pass data
for packetizing directly into the method.

Change-Id: I553fa8c1636041c4a5ff043862918a5cdc9163ba
2016-07-20 14:00:36 -07:00
Tom Finegan
448af971d2 webm2pes: Restore frame fragmentation support.
Cap packet payload at 32 kB. Update test to expect non-zero
packet length.

Change-Id: Ibb68a4ef8d32c049c492ae546c631ef6376e3ffd
2016-07-18 14:32:02 -07:00
Tom Finegan
900d322cc8 vpxpes_parser/webm2pes: BCMV and PTS fixes.
- Write BCMV length value big endian and include BCMV header
  size.
- Write PTS bits big endian.

Change-Id: I8cd72c233c21f5909438f5a3bb817e9477bdfcfb
2016-06-02 17:05:09 -07:00
Tom Finegan
4b735452bb webm2pes: Add start code emulation prevention.
- Make start codes reliable for VPx in PES.
- Stop setting the PES size field and stop splitting packets when
  larger than UINT16_MAX (always set 0; rely on start codes to find
  packet boundaries).

Change-Id: I402e91c26562e930f61543ca59223b83cc92be29
2016-06-02 17:05:07 -07:00
Tom Finegan
a8ffbd4ed2 webm2pes: Fix format specifier warnings.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1207

Change-Id: If60866f8e60969bc6cbaef8eee72a805270bf65d
2016-05-06 11:40:38 -07:00
Tom Finegan
22b0845686 webmts: Fix implicit conversion warnings.
Fix warnings exposed by addition of -Wshorten-64-32 compiler flag
in webmts sources.

Change-Id: I3104e7be2bf991d7e108b652857ecca8e82c5ef9
2016-04-08 10:44:35 -07:00
Tom Finegan
2ff2954fa9 msvc/webm2pes: Silence integer and floating point conversion warnings.
Change-Id: I5379b5a3896b316327f35ebfaa3b2fc8545f002b
2016-03-31 10:43:10 -07:00
Tom Finegan
c1d6a70204 iwyu/webm2pes: Update includes.
Include what you use analysis based include update.

Change-Id: Ib390c6a669d31ec298a4db407a50904576b99d91
2016-03-10 09:21:48 -08:00
Tom Finegan
1f74651b5b webmts: Move PES/TS sources to m2ts sub directory.
Change-Id: I5c02b62460a6bf8dd73fb9274d1668a5a13af373
2016-03-07 14:32:08 -08:00