Skip to content

Commit

Permalink
Fix pts generation with repeated parameter set (#42)
Browse files Browse the repository at this point in the history
* Get pts from the VCL NAL unit instead of from the first NAL unit from the AU when the timestamps are rewritten

* Fix the description of skip_until_keyframe option
  • Loading branch information
varsill authored Sep 7, 2023
1 parent 3273daf commit 906d91d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The package can be installed by adding `membrane_h264_plugin` to your list of de
```elixir
def deps do
[
{:membrane_h264_plugin, "~> 0.7.1"}
{:membrane_h264_plugin, "~> 0.7.2"}
]
end
```
Expand Down
5 changes: 2 additions & 3 deletions lib/membrane_h264_plugin/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ defmodule Membrane.H264.Parser do
use Membrane.Filter

require Membrane.Logger
require Membrane.H264.Parser.NALuTypes, as: NALuTypes

alias __MODULE__.{
AUSplitter,
Expand Down Expand Up @@ -114,8 +115,6 @@ defmodule Membrane.H264.Parser do
default: true,
description: """
Determines whether to drop the stream until the first key frame is received.
Defaults to false.
"""
],
repeat_parameter_sets: [
Expand Down Expand Up @@ -528,7 +527,7 @@ defmodule Membrane.H264.Parser do

{timestamps, %{state | au_timestamp_generator: timestamp_generator}}
else
{hd(au).timestamps, state}
{Enum.find(au, &NALuTypes.is_vcl_nalu_type(&1.type)).timestamps, state}
end
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.H264.Plugin.Mixfile do
use Mix.Project

@version "0.7.1"
@version "0.7.2"
@github_url "https://github.com/membraneframework-labs/membrane_h264_plugin"

def project do
Expand Down

0 comments on commit 906d91d

Please sign in to comment.