[FFmpeg-trac] #5023(avformat:reopened): Can no longer read mjpeg from Mobotix camera

FFmpeg trac at avcodec.org
Wed Sep 25 02:27:37 EEST 2019


#5023: Can no longer read mjpeg from Mobotix camera
-------------------------------------+-------------------------------------
             Reporter:  hackeron     |                    Owner:
                 Type:  defect       |                   Status:  reopened
             Priority:  important    |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  mjpeg        |               Blocked By:
  mpjpeg regression                  |
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by cehoyos):

 Replying to [comment:48 barsnick]:
 > Replying to [comment:47 smbz]:

 > > There is a call to ffio_ensure_seekback() which looks like it's meant
 to ensure that it is always possible to seek back by this amount, but from
 what I can tell this will work only at the beginning of the stream (i.e.
 for probing or headers) and not mid-stream.  Is anyone able to confirm
 that?
 >
 > My take is that {{{ffio_ensure_seekback(s->pb, read_chunk)}}}, where
 it's currently placed, only makes sure that the first chunk is rewindable.
 This needs to be done for every subsequent chunk fetch as well. I dropped
 (or rather moved) that line and instead changed the while condition:
 > {{{
 >         while ((ret = ffio_ensure_seekback(s->pb, read_chunk -
 remaining) >= 0) && (ret = av_append_packet(s->pb, pkt, read_chunk -
 remaining)) >= 0) {
 > }}}
 >
 > And suddenly, decoding the stream works perfectly (at least as far as I
 expect from any mpjpeg stream).
 This change also fixes ticket #5921.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5023#comment:49>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list