diff mbox

[FFmpeg-devel] lavf/mpegtsenc: clarify pcr_period unit of measurement

Message ID 20170316024731.888-1-lou@lrcd.com
State Accepted
Commit e7282674a505d548746a4734cbe902a9f242eb6b
Headers show

Commit Message

Lou Logan March 16, 2017, 2:47 a.m. UTC
pcr_period is in milliseconds.

Signed-off-by: Lou Logan <lou@lrcd.com>
---
 libavformat/mpegtsenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer March 16, 2017, 3:39 p.m. UTC | #1
On Wed, Mar 15, 2017 at 06:47:31PM -0800, Lou Logan wrote:
> pcr_period is in milliseconds.
> 
> Signed-off-by: Lou Logan <lou@lrcd.com>
> ---
>  libavformat/mpegtsenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index 0f394c5fe0..3250dde311 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -1945,7 +1945,7 @@ static const AVOption options[] = {
>      { "omit_video_pes_length", "Omit the PES packet length for video packets",
>        offsetof(MpegTSWrite, omit_video_pes_length), AV_OPT_TYPE_BOOL,
>        { .i64 = 1 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
> -    { "pcr_period", "PCR retransmission time",
> +    { "pcr_period", "PCR retransmission time in milliseconds",
>        offsetof(MpegTSWrite, pcr_period), AV_OPT_TYPE_INT,

i suggested it in the past already, but all time and duration values
should be changed to use seconds. It would be much cleaner, consistent
and less confusing.
using actual common day suffixes to indicate milli and micro instead
of having each option use a different unit


[...]
Lou Logan March 16, 2017, 4:56 p.m. UTC | #2
On Thu, 16 Mar 2017 16:39:18 +0100
Michael Niedermayer <michael@niedermayer.cc> wrote:

> i suggested it in the past already, but all time and duration values
> should be changed to use seconds. It would be much cleaner, consistent
> and less confusing.

Agreed, but this minor commit can be somewhat informative until if/when
the time values are made consistent.

If someone wants to work on that let me know and I can help deal with
updating the docs.
Michael Niedermayer March 16, 2017, 6:05 p.m. UTC | #3
On Thu, Mar 16, 2017 at 08:56:54AM -0800, Lou Logan wrote:
> On Thu, 16 Mar 2017 16:39:18 +0100
> Michael Niedermayer <michael@niedermayer.cc> wrote:
> 
> > i suggested it in the past already, but all time and duration values
> > should be changed to use seconds. It would be much cleaner, consistent
> > and less confusing.
> 
> Agreed, but this minor commit can be somewhat informative until if/when
> the time values are made consistent.

sure, didnt mean to stop you


> 
> If someone wants to work on that let me know and I can help deal with
> updating the docs.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Lou Logan March 16, 2017, 7:39 p.m. UTC | #4
On Wed, 15 Mar 2017 18:47:31 -0800
Lou Logan <lou@lrcd.com> wrote:

> pcr_period is in milliseconds.
> 
> Signed-off-by: Lou Logan <lou@lrcd.com>
> ---
>  libavformat/mpegtsenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Pushed.
diff mbox

Patch

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 0f394c5fe0..3250dde311 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1945,7 +1945,7 @@  static const AVOption options[] = {
     { "omit_video_pes_length", "Omit the PES packet length for video packets",
       offsetof(MpegTSWrite, omit_video_pes_length), AV_OPT_TYPE_BOOL,
       { .i64 = 1 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
-    { "pcr_period", "PCR retransmission time",
+    { "pcr_period", "PCR retransmission time in milliseconds",
       offsetof(MpegTSWrite, pcr_period), AV_OPT_TYPE_INT,
       { .i64 = PCR_RETRANS_TIME }, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
     { "pat_period", "PAT/PMT retransmission time limit in seconds",