Re: [FFmpeg-devel] [PATCH 1/3] avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
On 7/18/2016 8:56 PM, Michael Niedermayer wrote: > On Mon, Jul 18, 2016 at 01:56:29PM -0300, James Almer wrote: >> On 7/12/2016 6:36 PM, James Almer wrote: >>> Signed-off-by: James Almer>>> --- >>> libavformat/oggparsevp8.c | 6 +- >>> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> Ping for patchset. > > you are the author of the oggparsevp8 code, also i tested this a bit > with random ogg files, seems not breaking anything Pushed the first two patches. I'll push the third one soon if nobody comments on it. Thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
On Mon, Jul 18, 2016 at 01:56:29PM -0300, James Almer wrote: > On 7/12/2016 6:36 PM, James Almer wrote: > > Signed-off-by: James Almer> > --- > > libavformat/oggparsevp8.c | 6 +- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > Ping for patchset. you are the author of the oggparsevp8 code, also i tested this a bit with random ogg files, seems not breaking anything [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
On 7/12/2016 6:36 PM, James Almer wrote: > Signed-off-by: James Almer> --- > libavformat/oggparsevp8.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Ping for patchset. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
On 7/12/2016 7:52 PM, Moritz Barsnick wrote: > On Tue, Jul 12, 2016 at 18:36:20 -0300, James Almer wrote: >> +uint32_t invcnt = !((granule >> 30) & 3); > > If it's just for storing a 0/1 (bool, basically), wouldn't you use the > more unspecific type "int"? (Not sure whether it matters at all.) > > Moritz Yeah, int should suffice. I used uint32_t for alignment purposes with the other variables, but then i added the comment and that became superfluous i guess. Changed locally. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
On Tue, Jul 12, 2016 at 18:36:20 -0300, James Almer wrote: > +uint32_t invcnt = !((granule >> 30) & 3); If it's just for storing a 0/1 (bool, basically), wouldn't you use the more unspecific type "int"? (Not sure whether it matters at all.) Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/3] avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
Signed-off-by: James Almer--- libavformat/oggparsevp8.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/oggparsevp8.c b/libavformat/oggparsevp8.c index d57419e..3ba5375 100644 --- a/libavformat/oggparsevp8.c +++ b/libavformat/oggparsevp8.c @@ -82,7 +82,11 @@ static uint64_t vp8_gptopts(AVFormatContext *s, int idx, struct ogg *ogg = s->priv_data; struct ogg_stream *os = ogg->streams + idx; -uint64_t pts = (granule >> 32); +uint32_t invcnt = !((granule >> 30) & 3); +// If page granule is that of an invisible vp8 frame, its pts will be +// that of the end of the next visible frame. We substract 1 for those +// to prevent messing up pts calculations. +uint64_t pts = (granule >> 32) - invcnt; uint32_t dist = (granule >> 3) & 0x07ff; if (!dist) -- 2.9.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel