[FFmpeg-devel] [PATCH v2] avformat/ifv: added support for ifv cctv files

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed May 8 09:01:09 EEST 2019


Am Mi., 8. Mai 2019 um 00:52 Uhr schrieb Reimar Döffinger
<Reimar.Doeffinger at gmx.de>:
>
> On 07.05.2019, at 12:00, Swaraj Hota <swarajhota353 at gmail.com> wrote:
>
> > On Sun, May 05, 2019 at 09:59:01PM +0200, Reimar Döffinger wrote:
> >>
> >>
> >>> +    /*read video index*/
> >>> +    avio_seek(s->pb, 0xf8, SEEK_SET);
> >> [...]
> >>> +    avio_skip(s->pb, ifv->vid_index->frame_offset - avio_tell(s->pb));
> >>
> >> Why use avio_seek in one place and avio_skip in the other?
> >>
> >
> > No particular reason. Essentially all are just skips. There is no
> > backward seek. I left two seeks becuase they seemed more readable.
> > Someone could know at a glance at what offset the first video and audio
> > index are assumed/found to be. Should I change them to skips as well?
>
> Not quite sure how things work nowadays, but I'd suggest to use whichever
> gives the most readable code.
> Which would mean using avio_seek in this case.

I originally suggested using avio_skip() instead of avio_seek() to clarify
that no back-seeking is involved.
I realize it may not have been the best approach...

Thank you for your comments, Carl Eugen


More information about the ffmpeg-devel mailing list