[libav-devel] [PATCH 1/5] movenc: use correct tag list for AVOutputFormat.codec_tag

2017-06-19 Thread John Stebbins
ff_mp4_obj_type contains the wrong type of tags for AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to validate AVCodecParameters.codec_tag so needs to be the same type of tag. Creates new tag lists for mp4 and ismv. New tag lists support same list of codecs found in ff_mp4_obj_type.

Re: [libav-devel] [PATCH 1/5] movenc: use correct tag list for AVOutputFormat.codec_tag

2017-06-19 Thread John Stebbins
On 06/19/2017 08:06 AM, Hendrik Leppkes wrote: > On Mon, Jun 19, 2017 at 5:02 PM, John Stebbins <stebb...@jetheaddev.com> > wrote: >> ff_mp4_obj_type contains the wrong type of tags for >> AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to >> validate

[libav-devel] [PATCH 5/5] movenc: allow alternative hvc1 h.265 codec tag

2017-06-19 Thread John Stebbins
If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for h.265 streams. QuickTime (and other Apple software) requires 'hvc1'. --- libavformat/movenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 5b5082d..d79646c 100644 ---

[libav-devel] [PATCH 3/5] movenc: move tags definitions to where they are used

2017-06-19 Thread John Stebbins
--- libavformat/movenc.c | 62 ++-- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 2a6d3b2..805d928 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -779,17 +779,6 @@

[libav-devel] [PATCH 4/5] movenc: write correct format hvcc when tag is hvc1

2017-06-19 Thread John Stebbins
--- libavformat/movenc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 805d928..5b5082d 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -727,7 +727,10 @@ static int mov_write_hvcc_tag(AVIOContext *pb,

[libav-devel] [PATCH 1/5] movenc: use correct tag list for AVOutputFormat.codec_tag

2017-06-19 Thread John Stebbins
ff_mp4_obj_type contains the wrong type of tags for AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to validate AVCodecParameters.codec_tag so needs to be the same type of tag. Creates new tag lists for mp4 and ismv. New tag lists support same list of codecs found in ff_mp4_obj_type.

[libav-devel] [PATCH 2/5] movenc: simplify codec_tag lookup

2017-06-19 Thread John Stebbins
mux.c init_muxer() already sets codec_tag correctly in the cases simplified here. This also adds the capability to support alternative tags for the same codec_id --- libavformat/movenc.c | 60 1 file changed, 13 insertions(+), 47 deletions(-)

Re: [libav-devel] [PATCH 4/4] movenc: allow alternative hvc1 h.265 codec tag

2017-06-19 Thread John Stebbins
On 06/19/2017 03:23 AM, Martin Storsjö wrote: > On Thu, 15 Jun 2017, John Stebbins wrote: > >> If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for >> h.265 streams. QuickTime (and other Apple software) requires 'hvc1'. >> --- >> libavformat/moven

Re: [libav-devel] [PATCH 2/4] movenc: generalize codec_tag lookup code

2017-06-16 Thread John Stebbins
On 06/15/2017 11:52 AM, John Stebbins wrote: > This simplifies the code and adds the capability to support alternative > tags for the same codec_id > --- > libavformat/movenc.c | 137 > ++- > 1 file changed, 70 insertion

[libav-devel] [PATCH 1/4] movenc: use correct tag list for AVOutputFormat.codec_tag

2017-06-15 Thread John Stebbins
ff_mp4_obj_type contains the wrong type of tags for AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to validate AVCodecParameters.codec_tag so needs to be the same type of tag. Creates new tag lists for mp4 and ismv. New tag lists support same list of codecs found in ff_mp4_obj_type.

[libav-devel] [PATCH 3/4] movenc: write correct format hvcc when tag is hvc1

2017-06-15 Thread John Stebbins
--- libavformat/movenc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index eb12431..0c1508f 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -727,7 +727,10 @@ static int mov_write_hvcc_tag(AVIOContext *pb,

[libav-devel] [PATCH 4/4] movenc: allow alternative hvc1 h.265 codec tag

2017-06-15 Thread John Stebbins
If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for h.265 streams. QuickTime (and other Apple software) requires 'hvc1'. --- libavformat/movenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 0c1508f..2ff4270 100644 ---

[libav-devel] [PATCH 2/4] movenc: generalize codec_tag lookup code

2017-06-15 Thread John Stebbins
This simplifies the code and adds the capability to support alternative tags for the same codec_id --- libavformat/movenc.c | 137 ++- 1 file changed, 70 insertions(+), 67 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index

Re: [libav-devel] [PATCH] movenc: Allow use of hvc1 tag for h.265

2017-06-14 Thread John Stebbins
On 06/14/2017 01:06 PM, Martin Storsjö wrote: > On Wed, 14 Jun 2017, John Stebbins wrote: > >> >> On 06/14/2017 12:13 PM, Martin Storsjö wrote: >>> On Wed, 14 Jun 2017, John Stebbins wrote: >>> >>>> On 06/13/2017 11:16 PM, Martin Storsjö wrote

Re: [libav-devel] [PATCH] movenc: Allow use of hvc1 tag for h.265

2017-06-14 Thread John Stebbins
On 06/14/2017 12:13 PM, Martin Storsjö wrote: > On Wed, 14 Jun 2017, John Stebbins wrote: > >> On 06/13/2017 11:16 PM, Martin Storsjö wrote: >>> On Tue, 13 Jun 2017, John Stebbins wrote: >>> >>>> On 06/13/2017 12:13 PM, Martin Storsjö wrote: >

Re: [libav-devel] [PATCH] movenc: Allow use of hvc1 tag for h.265

2017-06-14 Thread John Stebbins
On 06/13/2017 11:16 PM, Martin Storsjö wrote: > On Tue, 13 Jun 2017, John Stebbins wrote: > >> On 06/13/2017 12:13 PM, Martin Storsjö wrote: >>> On Mon, 12 Jun 2017, John Stebbins wrote: >>> >>>> If AVCodecParameters.codec_tag is 'hvc1' use it instead o

Re: [libav-devel] [PATCH] movenc: Allow use of hvc1 tag for h.265

2017-06-13 Thread John Stebbins
On 06/13/2017 12:13 PM, Martin Storsjö wrote: > On Mon, 12 Jun 2017, John Stebbins wrote: > >> If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for >> h.265 streams. QuickTime (and other Apple software) requires 'hvc1'. >> --- >> libavformat/moven

[libav-devel] [PATCH] movenc: Allow use of hvc1 tag for h.265

2017-06-12 Thread John Stebbins
If AVCodecParameters.codec_tag is 'hvc1' use it instead of 'hev1' for h.265 streams. QuickTime (and other Apple software) requires 'hvc1'. --- libavformat/movenc.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index

Re: [libav-devel] [PATCH] matroskadec: fix endianness fourcc and codec_tag

2017-03-05 Thread John Stebbins
On 03/01/2017 02:40 PM, John Stebbins wrote: > On 03/01/2017 10:38 AM, Luca Barbato wrote: >> On 01/03/2017 16:30, John Stebbins wrote: >>> This fixes decode of rawvideo in matroska. >>> --- >>> libavformat/matroskadec.c | 1 + >>> 1 file changed, 1

Re: [libav-devel] [PATCH] matroskadec: fix endianness fourcc and codec_tag

2017-03-01 Thread John Stebbins
On 03/01/2017 10:38 AM, Luca Barbato wrote: > On 01/03/2017 16:30, John Stebbins wrote: >> This fixes decode of rawvideo in matroska. >> --- >> libavformat/matroskadec.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/libavformat/matroskadec

Re: [libav-devel] [PATCH 3/3] put_bits: cache 64 bits when HAVE_FAST_64BIT

2017-03-01 Thread John Stebbins
On 03/01/2017 11:23 AM, Luca Barbato wrote: > On 28/02/2017 20:11, John Stebbins wrote: >> and fix fate-lavf-gif: sync_put_bits before writing each chunk. >> Cached bits from the previous chunk get written in the next chunk. >> This causes inconsistent output if put_bits c

[libav-devel] matroskadec fourcc

2017-03-01 Thread John Stebbins
This is a simplification of my previous patch for this issue. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH] matroskadec: fix endianness fourcc and codec_tag

2017-03-01 Thread John Stebbins
This fixes decode of rawvideo in matroska. --- libavformat/matroskadec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 4e121b6..75cfa85 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1612,6 +1612,7 @@

[libav-devel] [PATCH 1/3] put_bits: bounds check buffer

2017-02-28 Thread John Stebbins
This prevents invalid writes outside put_bits' buffer. It also has the side effect of allowing measurement of the required size of a buffer without the need to pre-allocate an over-sized buffer. This fixes a crash in aacenc.c where it could write past the end of the allocated packet, which is

[libav-devel] [PATCH 3/3] put_bits: cache 64 bits when HAVE_FAST_64BIT

2017-02-28 Thread John Stebbins
and fix fate-lavf-gif: sync_put_bits before writing each chunk. Cached bits from the previous chunk get written in the next chunk. This causes inconsistent output if put_bits caches 64 bits instead of 32. sync_put_bits make sure < 8 bits are still cached. --- libavcodec/put_bits.h | 89

[libav-devel] [PATCH 2/3] asvenc: make safe for 64bit put_bits

2017-02-28 Thread John Stebbins
Adds explicit call to flush_put_bits instead of assuming put_bits caches 32bits --- libavcodec/asvenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c index ac7c317..9f85710 100644 --- a/libavcodec/asvenc.c +++ b/libavcodec/asvenc.c @@ -258,6 +258,7

Re: [libav-devel] [PATCH 1/4] put_bits: bounds check buffer

2017-02-28 Thread John Stebbins
On 02/28/2017 09:16 AM, John Stebbins wrote: > On 02/28/2017 08:40 AM, Luca Barbato wrote: >> On 28/02/2017 16:27, Vittorio Giovara wrote: >>> On Sun, Feb 26, 2017 at 12:58 PM, John Stebbins <stebb...@jetheaddev.com> >>> wrote: >>>> This pre

Re: [libav-devel] [PATCH 1/4] put_bits: bounds check buffer

2017-02-28 Thread John Stebbins
On 02/28/2017 08:40 AM, Luca Barbato wrote: > On 28/02/2017 16:27, Vittorio Giovara wrote: >> On Sun, Feb 26, 2017 at 12:58 PM, John Stebbins <stebb...@jetheaddev.com> >> wrote: >>> This prevents invalid writes outside put_bits' buffer. >>> >>> It

Re: [libav-devel] [PATCH] avidec: handle broken AVI index better

2017-02-27 Thread John Stebbins
On 02/27/2017 12:36 PM, Luca Barbato wrote: > On 27/02/2017 20:22, John Stebbins wrote: >> -avio_seek(s->pb, pos + 8, SEEK_SET); > Is that intended? > ___ > Yes, I moved it to the "else" clause of the code I added.

[libav-devel] [PATCH] avidec: handle broken AVI index better

2017-02-27 Thread John Stebbins
A broken index that causes non-interleaved access and has a packet size of 0 causes an infinite loop reading 0 bytes. Switch to assuming file is interleaved if a broken index is detected. --- libavformat/avidec.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[libav-devel] [PATCH] matroskadec: fix endianness fourcc and codec_tag

2017-02-26 Thread John Stebbins
This fixes decode of rawvideo in matroska. --- libavformat/matroskadec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 4e121b6..edd1749 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@

Re: [libav-devel] put_bits enhancements

2017-02-26 Thread John Stebbins
On 02/26/2017 11:20 AM, Sean McGovern wrote: > Hi John, > > On Feb 26, 2017 12:58, "John Stebbins" <stebb...@jetheaddev.com> wrote: > > This patch set adds 2 enhancements to put_bits. First bounds checking > the destination buffer to prevent invalid writes. Se

[libav-devel] [PATCH 4/4] put_bits: cache 64 bits when HAVE_FAST_64BIT

2017-02-26 Thread John Stebbins
--- libavcodec/put_bits.h | 58 --- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index 30b1dd2..19d352c 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -32,8 +32,24

[libav-devel] put_bits enhancements

2017-02-26 Thread John Stebbins
This patch set adds 2 enhancements to put_bits. First bounds checking the destination buffer to prevent invalid writes. Second uint64_t internal bit cache for a small, but measurable, performance increase on 64bit systems. I discussed this series of patches with Luca on IRC. I started looking

[libav-devel] [PATCH 2/4] asvenc: make safe for 64bit put_bits

2017-02-26 Thread John Stebbins
Adds explicit call to flush_put_bits instead of assuming put_bits caches 32bits --- libavcodec/asvenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c index ac7c317..9f85710 100644 --- a/libavcodec/asvenc.c +++ b/libavcodec/asvenc.c @@ -258,6 +258,7

[libav-devel] [PATCH 3/4] gif: flush_put_bits before writing each chunk

2017-02-26 Thread John Stebbins
Parts of previous chunk were getting written in next chunk. This causes inconsistent output if put_bits caches 64 bits instead of 32. --- libavformat/gif.c | 2 +- tests/ref/lavf/gif | 6 +++--- tests/ref/seek/lavf-gif | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff

[libav-devel] [PATCH 1/4] put_bits: bounds check buffer

2017-02-26 Thread John Stebbins
This prevents invalid writes outside put_bits' buffer. It also has the side effect of allowing measurement of the required size of a buffer without the need to pre-allocate an over-sized buffer. This fixes a crash in aacenc.c where it could write past the end of the allocated packet, which is

Re: [libav-devel] [PATCH 3/4] mov: fix edit list issue that can cause A/V desync

2017-02-25 Thread John Stebbins
On 02/25/2017 05:17 AM, Robert Krüger wrote: > On Fri, Feb 24, 2017 at 9:24 PM, John Stebbins <stebb...@jetheaddev.com> > wrote: > >> Only the first entry in the edit list was factored into the time_offset >> of the first sample in a track. But when there is a

Re: [libav-devel] [PATCH 2/4] movenc: write AAC pre-roll sample group info

2017-02-25 Thread John Stebbins
On 02/25/2017 03:09 AM, Martin Storsjö wrote: > On Fri, 24 Feb 2017, John Stebbins wrote: > >> On 02/24/2017 03:13 PM, Martin Storsjö wrote: >>> On Fri, 24 Feb 2017, John Stebbins wrote: >>> >>>> On 02/24/2017 02:21 PM, Martin Storsjö wrote: >

Re: [libav-devel] [PATCH 2/4] movenc: write AAC pre-roll sample group info

2017-02-24 Thread John Stebbins
On 02/24/2017 03:13 PM, Martin Storsjö wrote: > On Fri, 24 Feb 2017, John Stebbins wrote: > >> On 02/24/2017 02:21 PM, Martin Storsjö wrote: >>> On Fri, 24 Feb 2017, John Stebbins wrote: >>> >>>> This recordes the number of AAC frames that must be

Re: [libav-devel] [PATCH 2/4] movenc: write AAC pre-roll sample group info

2017-02-24 Thread John Stebbins
On 02/24/2017 02:21 PM, Martin Storsjö wrote: > On Fri, 24 Feb 2017, John Stebbins wrote: > >> This recordes the number of AAC frames that must be decoded before valid >> audio is decoded. >> >> It also signals to Apple tools that the encoder delay is expl

[libav-devel] [PATCH 3/4] mov: fix edit list issue that can cause A/V desync

2017-02-24 Thread John Stebbins
Only the first entry in the edit list was factored into the time_offset of the first sample in a track. But when there is a delay (empty edit entry) the mediatime from the second entry must also be factored into the time_offset. --- libavformat/isom.h | 2 ++ libavformat/mov.c | 30

[libav-devel] [PATCH 4/4] mov: extract audio initial_padding from edit list

2017-02-24 Thread John Stebbins
--- libavformat/mov.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 1657647..a080216 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3806,13 +3806,24 @@ static int mov_read_header(AVFormatContext *s)

[libav-devel] [PATCH 1/4] movenc: factor initial_padding into edit lists

2017-02-24 Thread John Stebbins
initial_padding was getting added to the edit list indirectly due to initial negative dts. But in cases where the audio is delayed, all or part of initial_padding would be unaccounted for. This patch makes initial_padding explicit. --- libavformat/movenc.c | 60

[libav-devel] [PATCH 2/4] movenc: write AAC pre-roll sample group info

2017-02-24 Thread John Stebbins
This recordes the number of AAC frames that must be decoded before valid audio is decoded. It also signals to Apple tools that the encoder delay is explicitly set in the edit list. If the roll sample group is omitted, Apply tools will apply an implicit rule to remove encoder delay which would

[libav-devel] [PATCH] asfdec: fix reading files larger than 2GB

2017-02-24 Thread John Stebbins
avio_skip returns file position and overflows int --- libavformat/asfdec.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 34730b2..9e1f8f6 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -976,7 +976,8

Re: [libav-devel] [PATCH] asfdec: fix reading files larger than 2GB

2017-02-24 Thread John Stebbins
On 02/23/2017 08:50 PM, Luca Barbato wrote: > On 24/02/2017 01:05, John Stebbins wrote: >> avio_skip returns file position and overflows int >> --- >> libavformat/asfdec.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/liba

[libav-devel] [PATCH] asfdec: fix reading files larger than 2GB

2017-02-23 Thread John Stebbins
avio_skip returns file position and overflows int --- libavformat/asfdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 34730b2..10d3396 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -976,7 +976,8 @@

[libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-22 Thread John Stebbins
initial_padding was getting added to the edit list indirectly due to initial negative dts. But in cases where the audio is delayed, all or part of initial_padding would be unaccounted for. This patch makes initial_padding explicit. --- libavformat/movenc.c | 60

Re: [libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-22 Thread John Stebbins
On 02/22/2017 03:41 AM, Martin Storsjö wrote: > On Tue, 21 Feb 2017, John Stebbins wrote: > >> On 02/21/2017 02:54 PM, Martin Storsjö wrote: >>> On Tue, 21 Feb 2017, John Stebbins wrote: >>> >>>> initial_padding was getting added to the edit list i

[libav-devel] [PATCH] fate: Update fate-lavf-mkv after commit 5d3953a5dc

2017-02-21 Thread John Stebbins
--- tests/ref/lavf/mkv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv index db0aba0..04c5f3c 100644 --- a/tests/ref/lavf/mkv +++ b/tests/ref/lavf/mkv @@ -1,3 +1,3 @@ -76d400179dfd6143f50ea4d19fe8ed99 *./tests/data/lavf/lavf.mkv

Re: [libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-21 Thread John Stebbins
On 02/21/2017 02:54 PM, Martin Storsjö wrote: > On Tue, 21 Feb 2017, John Stebbins wrote: > >> initial_padding was getting added to the edit list indirectly due to >> initial negative dts. But in cases where the audio is delayed, >> all or part of initial_padd

[libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-21 Thread John Stebbins
initial_padding was getting added to the edit list indirectly due to initial negative dts. But in cases where the audio is delayed, all or part of initial_padding would be unaccounted for. This patch makes initial_padding explicit. --- libavformat/movenc.c | 58

Re: [libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-20 Thread John Stebbins
On 02/20/2017 03:27 PM, Martin Storsjö wrote: > On Mon, 20 Feb 2017, John Stebbins wrote: > >> initial_padding was getting added to the edit list indirectly due to >> initial negative dts. But in cases where the audio is delayed, >> all or part of initial_padd

Re: [libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-20 Thread John Stebbins
On 02/19/2017 03:23 PM, John Stebbins wrote: > initial_padding was getting added to the edit list indirectly due to > initial negative dts. But in cases where the audio is delayed, > all or part of initial_padding would be unaccounted for. This patch > makes initial_padd

[libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-19 Thread John Stebbins
initial_padding was getting added to the edit list indirectly due to initial negative dts. But in cases where the audio is delayed, all or part of initial_padding would be unaccounted for. This patch makes initial_padding explicit. --- libavformat/movenc.c | 53

Re: [libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-19 Thread John Stebbins
On 02/19/2017 02:57 PM, John Stebbins wrote: > initial_padding was getting added to the edit list indirectly due to > initial negative dts. But in cases where the audio is delayed, > all or part of initial_padding would be unaccounted for. This patch > makes initial_padd

Re: [libav-devel] [PATCH] dv: Don't return EIO upon EOF

2017-02-19 Thread John Stebbins
On 02/19/2017 10:25 AM, Luca Barbato wrote: > On 19/02/2017 17:15, John Stebbins wrote: >> --- >> libavformat/dv.c | 7 +-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/libavformat/dv.c b/libavformat/dv.c >> index d4e5180..0

[libav-devel] [PATCH] movenc: factor initial_padding into edit lists

2017-02-19 Thread John Stebbins
initial_padding was getting added to the edit list indirectly due to initial negative dts. But in cases where the audio is delayed, all or part of initial_padding would be unaccounted for. This patch makes initial_padding explicit. --- libavformat/movenc.c | 53

[libav-devel] [PATCH] movenc: write AAC pre-roll sample group info

2017-02-19 Thread John Stebbins
This recordes the number of AAC frames that must be decoded before valid audio is decoded. It also signals to Apple tools that the encoder delay is explicitly set in the edit list. If the roll sample group is omitted, Apply tools will apply an implicit rule to remove encoder delay which would

[libav-devel] [PATCH] mov: fix edit list issue that can cause A/V desync

2017-02-19 Thread John Stebbins
Only the first entry in the edit list was factored into the time_offset of the first sample in a track. But when there is a delay (empty edit entry) the mediatime from the second entry must also be factored into the time_offset. --- libavformat/isom.h | 2 ++ libavformat/mov.c | 30

[libav-devel] [PATCH] dv: Don't return EIO upon EOF

2017-02-19 Thread John Stebbins
--- libavformat/dv.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index d4e5180..0cd60de 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -484,11 +484,14 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)

Re: [libav-devel] [PATCH] dv: Don't return EIO upon EOF

2017-02-18 Thread John Stebbins
On 01/14/2017 12:46 PM, John Stebbins wrote: > On 01/14/2017 12:30 PM, John Stebbins wrote: >> On 01/12/2017 10:51 PM, wm4 wrote: >>> On Thu, 12 Jan 2017 10:33:28 -0700 >>> John Stebbins <stebb...@jetheaddev.com> wrote: >>> >>>> --- >

Re: [libav-devel] [PATCH] h264dec: fix dropped initial SEI recovery point

2017-02-18 Thread John Stebbins
On 02/10/2017 02:33 AM, Anton Khirnov wrote: > Quoting John Stebbins (2017-02-08 22:52:28) >> --- >> libavcodec/h264dec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c >> index 5137

Re: [libav-devel] [PATCH] matroskaenc: factor ts_offset in block timecode computation

2017-02-18 Thread John Stebbins
On 02/16/2017 10:43 AM, John Stebbins wrote: > On 02/16/2017 10:19 AM, Vittorio Giovara wrote: >> On Thu, Feb 16, 2017 at 11:14 AM, John Stebbins <stebb...@jetheaddev.com> >> wrote: >>> On 02/15/2017 10:09 PM, Luca Barbato wrote: >>>> On 15/02/2017 2

Re: [libav-devel] [PATCH] matroskaenc: factor ts_offset in block timecode computation

2017-02-16 Thread John Stebbins
On 02/16/2017 10:19 AM, Vittorio Giovara wrote: > On Thu, Feb 16, 2017 at 11:14 AM, John Stebbins <stebb...@jetheaddev.com> > wrote: >> On 02/15/2017 10:09 PM, Luca Barbato wrote: >>> On 15/02/2017 23:29, John Stebbins wrote: >>>> ts_offset was added to

Re: [libav-devel] [PATCH] matroskaenc: factor ts_offset in block timecode computation

2017-02-16 Thread John Stebbins
On 02/16/2017 09:25 AM, Diego Biurrun wrote: > On Wed, Feb 15, 2017 at 03:29:15PM -0700, John Stebbins wrote: >> ts_offset was added to cluster timecode, but then effectively subtracted >> back off the block timecode > Factor ts_offset in*TO* block timecode computation? > >

Re: [libav-devel] [PATCH] matroskaenc: factor ts_offset in block timecode computation

2017-02-16 Thread John Stebbins
On 02/15/2017 10:09 PM, Luca Barbato wrote: > On 15/02/2017 23:29, John Stebbins wrote: >> ts_offset was added to cluster timecode, but then effectively subtracted >> back off the block timecode >> --- >> libavformat/matroskaenc.c | 1 + >> 1 file changed

[libav-devel] [PATCH] matroskaenc: factor ts_offset in block timecode computation

2017-02-15 Thread John Stebbins
ts_offset was added to cluster timecode, but then effectively subtracted back off the block timecode --- libavformat/matroskaenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index e951a0f..2fe6e0e 100644 ---

[libav-devel] [PATCH] h264dec: fix dropped initial SEI recovery point

2017-02-08 Thread John Stebbins
--- libavcodec/h264dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 5137039..6d7aa7b 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -452,7 +452,6 @@ void ff_h264_flush_change(H264Context *h) if

Re: [libav-devel] [PATCH] dv: Don't return EIO upon EOF

2017-01-14 Thread John Stebbins
On 01/14/2017 12:30 PM, John Stebbins wrote: > On 01/12/2017 10:51 PM, wm4 wrote: >> On Thu, 12 Jan 2017 10:33:28 -0700 >> John Stebbins <stebb...@jetheaddev.com> wrote: >> >>> --- >>> libavformat/dv.c | 7 ++- >>> 1 file chan

Re: [libav-devel] [PATCH] asfdec: fix crash in asf_read_packet

2017-01-14 Thread John Stebbins
On 01/13/2017 12:36 AM, Luca Barbato wrote: > On 12/01/2017 21:36, John Stebbins wrote: >> --- >> libavformat/asfdec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > How about: > > Correctly iterate over the ASF streams > > (what makes me wonder

Re: [libav-devel] [PATCH] dv: Don't return EIO upon EOF

2017-01-14 Thread John Stebbins
On 01/12/2017 10:51 PM, wm4 wrote: > On Thu, 12 Jan 2017 10:33:28 -0700 > John Stebbins <stebb...@jetheaddev.com> wrote: > >> --- >> libavformat/dv.c | 7 ++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/dv.c

Re: [libav-devel] [PATCH] asfdec: fix crash in asf_read_packet

2017-01-12 Thread John Stebbins
On 01/12/2017 03:30 PM, Hendrik Leppkes wrote: > On Fri, Jan 13, 2017 at 7:36 AM, John Stebbins <stebb...@jetheaddev.com> > wrote: >> --- >> libavformat/asfdec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavforma

[libav-devel] [PATCH] asfdec: fix crash in asf_read_packet

2017-01-12 Thread John Stebbins
--- libavformat/asfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 1c50ad6..d602af8 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -1485,7 +1485,7 @@ static int asf_read_packet(AVFormatContext *s,

[libav-devel] [PATCH] dv: Don't return EIO upon EOF

2017-01-12 Thread John Stebbins
--- libavformat/dv.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index d4e5180..3ff369b 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -484,10 +484,15 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)

Re: [libav-devel] [PATCH] dv: Don't return EIO upon EOF

2017-01-12 Thread John Stebbins
On 01/12/2017 05:31 AM, Diego Biurrun wrote: > On Wed, Jan 11, 2017 at 12:22:10PM -0700, John Stebbins wrote: >> --- a/libavformat/dv.c >> +++ b/libavformat/dv.c >> @@ -478,7 +478,7 @@ static int dv_read_header(AVFormatContext *s) >> static int dv_read_packet(AVForm

[libav-devel] [PATCH] dv: Don't return EIO upon EOF

2017-01-11 Thread John Stebbins
--- libavformat/dv.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index d4e5180..7e52e42 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -478,7 +478,7 @@ static int dv_read_header(AVFormatContext *s) static int

[libav-devel] [PATCH] matroskadec: fix SRT subtitle duration

2016-12-22 Thread John Stebbins
The codec id for SRT was changed and conditionals were not updated. --- libavformat/matroskadec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 8016730..a3954b0 100644 --- a/libavformat/matroskadec.c +++

Re: [libav-devel] [PATCH 1/2] add application private packet and frame side data

2016-03-22 Thread John Stebbins
On 03/22/2016 09:54 AM, Luca Barbato wrote: > On 22/03/16 16:39, John Stebbins wrote: > >> That would be a good option. Although it would probably be easier to >> identify which *do not* support this and mark >> them. If others agree, I can add such a flag to the patc

Re: [libav-devel] [PATCH 1/2] add application private packet and frame side data

2016-03-22 Thread John Stebbins
On 03/22/2016 09:42 AM, Hendrik Leppkes wrote: > On Tue, Mar 22, 2016 at 3:59 PM, John Stebbins <stebb...@jetheaddev.com> > wrote: >> On 03/22/2016 05:02 AM, Luca Barbato wrote: >>> On 22/03/16 09:36, wm4 wrote: >>>> As far as I understand it,

Re: [libav-devel] [PATCH 1/2] add application private packet and frame side data

2016-03-22 Thread John Stebbins
On 03/22/2016 09:28 AM, wm4 wrote: > On Tue, 22 Mar 2016 08:59:24 -0600 > John Stebbins <stebb...@jetheaddev.com> wrote: > >> On 03/22/2016 05:02 AM, Luca Barbato wrote: >>> On 22/03/16 09:36, wm4 wrote: >>>> As far as I understand it, not every deco

Re: [libav-devel] [PATCH 1/2] add application private packet and frame side data

2016-03-22 Thread John Stebbins
On 03/22/2016 05:02 AM, Luca Barbato wrote: > On 22/03/16 09:36, wm4 wrote: >> As far as I understand it, not every decoder will be able to pass this >> through correctly. (Hardware decoders, wrappers.) > At least some of those situation can be addressed, for the others I > guess working with who

[libav-devel] [PATCH 2/2] APIChanges: add entry for AV_*_DATA_APP_PRIVATE side data

2016-03-21 Thread John Stebbins
From: John Stebbins <jstebb...@roamer.alpe-d-or.dyn-o-saur.com> --- doc/APIchanges | 8 1 file changed, 8 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index c50faa6..796cb21 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,14 @@ libavutil: 2015

[libav-devel] [PATCH 1/2] add application private packet and frame side data

2016-03-21 Thread John Stebbins
From: John Stebbins <jstebb...@roamer.alpe-d-or.dyn-o-saur.com> This side data is a better more flexible replacement for AVCodecContext.reordered_opaque. During decoding, it is added to an AVPacket by the application, and provided back, reordered, to the application in the decoded frame.

Re: [libav-devel] [PATCH 1/2] mov: Force the full parsing of mp3

2016-02-11 Thread John Stebbins
On Sat, 2016-02-06 at 13:15 +0100, Luca Barbato wrote: > Some muxer might or might not fit incomplete mp3 frames in > their packets. > > Bug-Id: 899 > > CC: libav-sta...@libav.org > --- >  libavformat/mov.c | 3 +++ >  1 file changed, 3 insertions(+) > > diff --git a/libavformat/mov.c

Re: [libav-devel] [PATCH] avformat/mov: Autodetect mp3s which need parsing

2015-11-13 Thread John Stebbins
On Tue, 2015-11-10 at 17:50 +0100, Anton Khirnov wrote: > Quoting Vittorio Giovara (2015-10-23 18:31:55) > > On Fri, Oct 23, 2015 at 3:31 PM, Luca Barbato > > wrote: > > > On 23/10/15 15:29, Vittorio Giovara wrote: > > > > +// If mp3 packets have a non constant duration,

Re: [libav-devel] [PATCH 2/3] avcodec: Define side data type for fallback track

2015-11-13 Thread John Stebbins
On Sat, 2015-11-07 at 17:19 +0100, Anton Khirnov wrote: > Quoting Hendrik Leppkes (2015-11-07 09:28:37) > > On Sat, Nov 7, 2015 at 2:11 AM, wm4 <nfx...@googlemail.com> wrote: > > > On Fri, 6 Nov 2015 11:24:08 -0800 > > > John Stebbins <stebb...@jetheaddev.com>

Re: [libav-devel] [PATCH 2/3] avcodec: Define side data type for fallback track

2015-11-07 Thread John Stebbins
On 11/07/2015 12:28 AM, Hendrik Leppkes wrote: > On Sat, Nov 7, 2015 at 2:11 AM, wm4 <nfx...@googlemail.com> wrote: >> On Fri, 6 Nov 2015 11:24:08 -0800 >> John Stebbins <stebb...@jetheaddev.com> wrote: >> >>> On Fri, 2015-11-06 at 17:17 +0100, wm4 wro

Re: [libav-devel] [PATCH 2/3] avcodec: Define side data type for fallback track

2015-11-06 Thread John Stebbins
On Fri, 2015-11-06 at 17:17 +0100, wm4 wrote: > On Fri, 6 Nov 2015 07:29:18 -0800 > John Stebbins <stebb...@jetheaddev.com> wrote: > > > This side data type is meant to be added to AVStream side data. > > A fallback track indicates an alternate track to use whe

[libav-devel] [PATCH 2/3] avcodec: Define side data type for fallback track

2015-11-06 Thread John Stebbins
This side data type is meant to be added to AVStream side data. A fallback track indicates an alternate track to use when the current track can not be decoded for some reason. e.g. no decoder available for codec. --- doc/APIchanges | 4 libavcodec/avcodec.h | 8

[libav-devel] [PATCH] movenc: add fallback audio track tref support

2015-11-05 Thread John Stebbins
This feature allows making associations between audio tracks that apple players recognize. E.g. when an ac3 track has a tref that points to an aac track, devices that don't support ac3 will automatically fall back to the aac track. Apple used to *guess* these associations, but new products

[libav-devel] [PATCH 2/3] avcodec: Define side data type for fallback track

2015-11-05 Thread John Stebbins
This side data type is meant to be added to AVStream side data. A fallback track indicates an alternate track to use when the current track can not be decoded for some reason. e.g. no decoder available for codec. --- libavcodec/avcodec.h | 8 libavcodec/version.h | 2 +- 2 files

[libav-devel] [PATCH 3/3] movenc: add fallback audio track tref support

2015-11-05 Thread John Stebbins
This feature allows making associations between audio tracks that apple players recognize. E.g. when an ac3 track has a tref that points to an aac track, devices that don't support ac3 will automatically fall back to the aac track. Apple used to *guess* these associations, but new products

[libav-devel] [PATCH 1/3] avformat: expose av_stream_new_side_data helper

2015-11-05 Thread John Stebbins
--- libavformat/avformat.h | 10 ++ libavformat/internal.h | 7 --- libavformat/mov.c| 4 ++-- libavformat/replaygain.c | 2 +- libavformat/utils.c | 3 ++- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/libavformat/avformat.h

Re: [libav-devel] [PATCH] movenc: add fallback audio track tref support

2015-11-05 Thread John Stebbins
On Thu, 2015-11-05 at 13:05 +0100, Anton Khirnov wrote: > Quoting John Stebbins (2015-11-05 01:34:41) > > On Wed, 2015-11-04 at 20:12 +0200, Martin Storsjö wrote: > > > On Wed, 4 Nov 2015, Luca Barbato wrote: > > > > > > > On 04/11/15 00:29, John Stebbi

Re: [libav-devel] [PATCH] movenc: add fallback audio track tref support

2015-11-04 Thread John Stebbins
On Wed, 2015-11-04 at 20:12 +0200, Martin Storsjö wrote: > On Wed, 4 Nov 2015, Luca Barbato wrote: > > > On 04/11/15 00:29, John Stebbins wrote: > > > This feature allows making associations between audio tracks > > > that apple players recognize. E.g. when

[libav-devel] [PATCH 07/12] lavfi/setpts: add FRAME_RATE constant

2015-11-03 Thread John Stebbins
From: Stefano Sabatini Useful for dealing with constant frame-rate video. (cherry picked from ffmpeg commit 722762f7e1212b4d02142778fabfdd73375722e0) --- doc/filters.texi | 3 +++ libavfilter/setpts.c | 9 + 2 files changed, 12 insertions(+) diff --git

[libav-devel] [PATCH 01/12] lavfi: add a frame_rate field to AVFilterLink.

2015-11-03 Thread John Stebbins
From: Nicolas George (cherry picked from ffmpeg commit 7b42036b3b23c85f473bf9369e37fa8da22eaf93) --- libavfilter/avfilter.c | 2 ++ libavfilter/avfilter.h | 12 libavfilter/version.h | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff

[libav-devel] [PATCH 04/12] vf_fps: set frame_rate.

2015-11-03 Thread John Stebbins
From: Nicolas George (cherry picked from ffmpeg commit 0d249316043fb69a3972029bff3a2969689ba8b6) --- libavfilter/vf_fps.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index ea22d37..e5562c8

  1   2   3   4   5   >