To M66: ffmpeg: Initialize a potential gap in ctts_data in mov_build_index

mov_read_ctts ignores ctts entries having count <= 0. Generally, the
aggregate of all ctts entries' count fields resulting from mov_read_ctts
can be less than the corresponding sample_count.

mov_build_index attempts to normalize any existing ctts_data counts to
be 1, to make a 1-1 mapping of a ctts_data entry to a sample.

That 1-1 mapping left a tail of uninitialized ctts_data entries when the
aggregate, normalized ctts_count < sample_count.

Even more generally, later usage of ctts_data may depend on the entire
ctts_allocated_size having been initialized.

This change memsets the entire allocation of the normalized ctts_data in
mov_build_index, to prevent use of uninitialized data later.

BUG=816787

Reviewed-on: https://chromium-review.googlesource.com/947110
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
(cherry picked from commit ef99a5d2520f934fa6c74ef7219aaa47e8717914)

TBR=xhwang@chromium.org

Change-Id: I367eb5aa7d1959d4d5dc178aa5ee8418461c64eb
Reviewed-on: https://chromium-review.googlesource.com/959462
Reviewed-by: Matthew Wolenetz <wolenetz@chromium.org>
2 files changed
tree: 9951de3721f43ac703d0dd780d07eedef2e3a48b
  1. .gitattributes
  2. .gitignore
  3. .travis.yml
  4. BUILD.gn
  5. CONTRIBUTING.md
  6. COPYING.GPLv2
  7. COPYING.GPLv3
  8. COPYING.LGPLv2.1
  9. COPYING.LGPLv3
  10. CREDITS
  11. CREDITS.chromium
  12. Changelog
  13. INSTALL.md
  14. LICENSE.md
  15. MAINTAINERS
  16. Makefile
  17. OWNERS
  18. PRESUBMIT.py
  19. README.chromium
  20. README.md
  21. RELEASE
  22. chromium/
  23. codereview.settings
  24. compat/
  25. configure
  26. doc/
  27. ffbuild/
  28. ffmpeg_generated.gni
  29. ffmpeg_options.gni
  30. fftools/
  31. libavcodec/
  32. libavdevice/
  33. libavfilter/
  34. libavformat/
  35. libavresample/
  36. libavutil/
  37. libpostproc/
  38. libswresample/
  39. libswscale/
  40. presets/
  41. tests/
  42. tools/
README.md

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.