Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reserved bits in PCR field in TS Adaptation Field not asserted #893

Closed
JPeMu opened this issue Feb 2, 2021 · 0 comments
Closed

Reserved bits in PCR field in TS Adaptation Field not asserted #893

JPeMu opened this issue Feb 2, 2021 · 0 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@JPeMu
Copy link
Contributor

JPeMu commented Feb 2, 2021

System info

Operating System: Linux Mint 19.3
Shaka Packager Version: v2.4.3-dd98700-release

Issue and steps to reproduce the problem

Packager Command:
packager-linux
'in=temp/shaka/u-1111-m-512x288-350.mp4,stream=video,playlist_name=temp/shaka/u-6400-m-512x288-350-1.m3u8,segment_template=temp/shaka/u-6400-m-512x288-350-1-$Number$.ts'
'in=temp/shaka/u-1111-a-128-1.mp4,stream=audio,playlist_name=temp/shaka/u-6400-a-128-1.m3u8,segment_template=temp/shaka/u-6400-a-128-1-$Number$.ts'
--hls_playlist_type live
--transport_stream_timestamp_offset_ms 1400
--segment_duration 5.0
--hls_master_playlist_output temp/shaka/u-6400-manifest.m3u8

Extra steps to reproduce the problem?
N/A

What is the expected result?
All generated TS segments should contain a PCR field in the TS Adaptation Field where the 6 reserved bits (between the base and extension) are set to '1' not '0' (As per ISO 13818-1 section 2.1.46 "reserved" ... Unless otherwise specified, all reserved bits shall be set to '1') and the Adapation Field spec section 2.3.4.5, table 2-6)

What happens instead?
The bits are set to '0' instead of '1'

<Please attach the input files or email to shaka-packager-issues@google.com.>

In src/media/formats/mp2t/ts_packet_writer_util.cc in WriteAdaptationField() function, the local variable "pcr_last_bit_reserved_and_pcr_extension" takes only the LSB of the base << 15 and does not also assert the reserved bits.

I believe the code line should read:
const uint16_t pcr_last_bit_reserved_and_pcr_extension =
((pcr_base & 1) << 15) | 0x7e00; // Assert reserved bits

@kqyang kqyang added type: bug Something isn't working correctly and removed needs triage labels Feb 3, 2021
@shaka-bot shaka-bot added this to the v2.5 milestone Feb 3, 2021
@kqyang kqyang closed this as completed in 36ef7ec Feb 3, 2021
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 4, 2021
@shaka-project shaka-project locked and limited conversation to collaborators Apr 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants