<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Andrew,<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
This is ffmpeg - moves fast, but break things! :}<br></blockquote><div><span class="gmail_default" style="font-size:small">Don't quote me on this, but GG says he does not know about "moves fast" but knows about "break things!"  That is because "moving fast" is relative but "breaking things" is absolute.</span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small">Anyway he just now looked at the patch </span><span class="gmail_default" style="font-size:small">along with your more recent email about it being not a good idea (digging into internals).  So he is still going to wait to see if they stop working on them so it becomes clear what they end up with.  Really, thanks for your effort and continuing to give us an early warning.  GG/Phyllis<br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
May be you should raise question to ffmpeg-devel, because if there is no suitable public api for some operations you need in CinGG series either better to be partially reverted or API is added ..<br>
<br>
I made simple patch, for CinGG itself, but right now I have trouble compiling CinGG even with this patch due to some other error (see my other email).<br>
<br>
diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C<br>
index 97b6698a..916b2077 100644<br>
--- a/cinelerra-5.1/cinelerra/ffmpeg.C<br>
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C<br>
@@ -720,7 +720,7 @@ int FFStream::seek(int64_t no, double rate)<br>
        AVRational time_base = st->time_base;<br>
        int64_t tstmp = time_base.num > 0 ? secs * time_base.den/time_base.num : 0;<br>
        if( !tstmp ) {<br>
-               if( st->nb_index_entries > 0 ) tstmp = st->index_entries[0].timestamp;<br>
+               if( st->internal->nb_index_entries > 0 ) tstmp = st->internal->index_entries[0].timestamp;<br>
                else if( st->start_time != AV_NOPTS_VALUE ) tstmp = st->start_time;<br>
                else if( st->first_dts != AV_NOPTS_VALUE ) tstmp = st->first_dts;<br>
                else tstmp = INT64_MIN+1;<br>
@@ -3943,10 +3943,10 @@ void FFStream::load_markers(IndexMarks &marks, double rate)<br>
        int in = 0;<br>
        int64_t sz = marks.size();<br>
        int max_entries = fmt_ctx->max_index_size / sizeof(AVIndexEntry) - 1;<br>
-       int nb_ent = st->nb_index_entries;<br>
+       int nb_ent = st->internal->nb_index_entries;<br>
 // some formats already have an index<br>
        if( nb_ent > 0 ) {<br>
-               AVIndexEntry *ep = &st->index_entries[nb_ent-1];<br>
+               AVIndexEntry *ep = &st->internal->index_entries[nb_ent-1];<br>
                int64_t tstmp = ep->timestamp;<br>
                if( nudge != AV_NOPTS_VALUE ) tstmp -= nudge;<br>
                double secs = ffmpeg->to_secs(tstmp, st->time_base);<br>
diff --git a/cinelerra-5.1/cinelerra/ffmpeg.h b/cinelerra-5.1/cinelerra/ffmpeg.h<br>
index 2e1f201f..46749802 100644<br>
--- a/cinelerra-5.1/cinelerra/ffmpeg.h<br>
+++ b/cinelerra-5.1/cinelerra/ffmpeg.h<br>
@@ -26,6 +26,7 @@<br>
<br>
 extern "C" {<br>
 #include "libavformat/avformat.h"<br>
+#include "libavformat/internal.h"<br>
 #include "libavformat/avio.h"<br>
 #include "libavcodec/avcodec.h"<br>
 #include "libavfilter/avfilter.h"<br>
<br>
may be this can be conditionalized on ffmpeg/libavformat version ...? If there will be no other way around this change.<br>
<br>
<br>
<br>
> <br>
> On Thu, Oct 29, 2020 at 10:42 AM Andrew Randrianasulu via Cin <<br>
> <a href="mailto:cin@lists.cinelerra-gg.org" target="_blank">cin@lists.cinelerra-gg.org</a>> wrote:<br>
> <br>
> ><br>
> > <a href="https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/cea7c19cda0ea1630ae1de8c102ab14231b9db10" rel="noreferrer" target="_blank">https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/cea7c19cda0ea1630ae1de8c102ab14231b9db10</a><br>
> ><br>
> > =====<br>
> > lavf: move AVStream.*index_entries* to AVStreamInternal<br>
> ><br>
> >  Those are private fields, no reason to have them exposed in a public<br>
> >  header. Since there are some (semi-)public fields located after these,<br>
> >  even though this section is supposed to be private, keep some dummy<br>
> >  padding there until the next major bump to preserve ABI compatibility.<br>
> > ======<br>
> ><br>
> > so, now CinGG fails to build:<br>
> ><br>
> > ffmpeg.C:723:11: error: no member named 'nb_index_entries' in 'AVStream'<br>
> >                 if( st->nb_index_entries > 0 ) tstmp =<br>
> > st->index_entries[0].timestamp;<br>
> >                     ~~  ^<br>
> > ffmpeg.C:723:46: error: no member named 'index_entries' in 'AVStream'<br>
> >                 if( st->nb_index_entries > 0 ) tstmp =<br>
> > st->index_entries[0].timestamp;<br>
> >                                                        ~~  ^<br>
> > 8 warnings generated.<br>
> > clang++ `cat i686/c_flags`  -DMSGQUAL=filebase -c filebase.C -o<br>
> > i686/filebase.o<br>
> > In file included from filebaseaudio.C:24:<br>
> > In file included from ./file.h:37:<br>
> > In file included from ./formattools.h:26:<br>
> > In file included from<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/guicast.h:35:<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bcpan.h:96:6:<br>
> > warning: 'BC_Pan::activate' hides overloaded virtual function<br>
> > [-Woverloaded-virtual]<br>
> >         int activate(int popup_x = -1, int popup_y = -1);<br>
> >             ^<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bcwindowbase.h:375:14:<br>
> > note: hidden overloaded virtual function 'BC_WindowBase::activate' declared<br>
> > here: different number of parameters (0 vs 2)<br>
> >         virtual int activate();<br>
> >                     ^<br>
> > In file included from filebaseaudio.C:24:<br>
> > In file included from ./file.h:37:<br>
> > In file included from ./formattools.h:26:<br>
> > In file included from<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/guicast.h:36:<br>
> > In file included from<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bcfilebox.h:33:<br>
> > In file included from<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bctextbox.h:25:<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bclistbox.h:190:6:<br>
> > warning: 'BC_ListBox::activate' hides overloaded virtual function<br>
> > [-Woverloaded-virtual]<br>
> >         int activate(int take_focus = 1);<br>
> >             ^<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bcwindowbase.h:375:14:<br>
> > note: hidden overloaded virtual function 'BC_WindowBase::activate' declared<br>
> > here: different number of parameters (0 vs 1)<br>
> >         virtual int activate();<br>
> >                     ^<br>
> > In file included from filebaseaudio.C:24:<br>
> > In file included from ./file.h:37:<br>
> > In file included from ./formattools.h:26:<br>
> > In file included from<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/guicast.h:36:<br>
> > In file included from<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bcfilebox.h:33:<br>
> > In file included from<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bctextbox.h:25:<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bclistbox.h:191:6:<br>
> > warning: 'BC_ListBox::activate' hides overloaded virtual function<br>
> > [-Woverloaded-virtual]<br>
> >         int activate(int x, int y, int w=-1, int h=-1);<br>
> >             ^<br>
> > /dev/shm/tmp/cinelerra-goodguy-20201029/cinelerra-5.1/cinelerra/../guicast/bcwindowbase.h:375:14:<br>
> > note: hidden overloaded virtual function 'BC_WindowBase::activate' declared<br>
> > here: different number of parameters (0 vs 4)<br>
> >         virtual int activate();<br>
> >                     ^<br>
> > ffmpeg.C:3922:5: warning: absolute value function 'abs' given an argument<br>
> > of type 'long long' but has parameter of type 'int' which may cause<br>
> > truncation of value [-Wabsolute-value]<br>
> > if( abs(pos-aud->curr_pos) > 1 )<br>
> >     ^<br>
> > ffmpeg.C:3922:5: note: use function 'std::abs' instead<br>
> > if( abs(pos-aud->curr_pos) > 1 )<br>
> >     ^~~<br>
> >     std::abs<br>
> > ffmpeg.C:3922:5: note: include the header <cstdlib> or explicitly provide<br>
> > a declaration for 'std::abs'<br>
> > ffmpeg.C:3955:19: error: no member named 'nb_index_entries' in 'AVStream'<br>
> >         int nb_ent = st->nb_index_entries;<br>
> >                      ~~  ^<br>
> > ffmpeg.C:3958:27: error: no member named 'index_entries' in 'AVStream'<br>
> >                 AVIndexEntry *ep = &st->index_entries[nb_ent-1];<br>
> >                                     ~~  ^<br>
> > 6 warnings and 4 errors generated.<br>
> > make[2]: *** [Makefile:563: i686/ffmpeg.o] Error 1<br>
> > make[2]: *** Waiting for unfinished jobs....<br>
> ><br>
> > -----<br>
> ><br>
> > Fix may be as simple as adding internal-> to those lines ...<br>
> ><br>
> > Looking at ffmpeg commit above ....<br>
> ><br>
> ><br>
> > <a href="https://git.ffmpeg.org/gitweb/ffmpeg.git/blobdiff/7e87288f73242dac6344e65f892569102893fac0..cea7c19cda0ea1630ae1de8c102ab14231b9db10:/libavformat/flacdec.c" rel="noreferrer" target="_blank">https://git.ffmpeg.org/gitweb/ffmpeg.git/blobdiff/7e87288f73242dac6344e65f892569102893fac0..cea7c19cda0ea1630ae1de8c102ab14231b9db10:/libavformat/flacdec.c</a><br>
> ><br>
> > -    if(index<0 || index >= s->streams[0]->nb_index_entries)<br>
> > +    if(index<0 || index >= s->streams[0]->internal->nb_index_entries)<br>
> ><br>
> > (from flac demuxer)<br>
> > --<br>
> > Cin mailing list<br>
> > <a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
> > <a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
> ><br>
> <br>
<br>
<br>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote></div></div>