[FFmpeg-trac] #9949(avformat:open): When the RTSP plays a TS stream, after the seek operation is performed, the data cached in the PES is not cleared. As a result, the data before the seek operation can be read after the seek operation.

FFmpeg trac at avcodec.org
Thu Sep 29 04:29:10 EEST 2022


#9949: When the RTSP plays a TS stream, after the seek operation is performed, the
data cached in the PES is not cleared. As a result, the data before the
seek operation can be read after the seek operation.
-------------------------------------+------------------------------------
             Reporter:  wujian       |                    Owner:  (none)
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:  RTSP SEEK    |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------
Description changed by wujian:

Old description:

> Summary of the bug:
> add Log print location:
> int ff_read_packet(AVFormatContext *s, AVPacket *pkt):
>         ret = s->iformat->read_packet(s, pkt);
>         if (ret < 0) {
>             .......
>             continue;
>         }
>         '''av_log(NULL, AV_LOG_FATAL, "pkt->pts = %lld\n", pkt->pts);'''
> static int read_thread(void *arg):
>             '''av_log(NULL, AV_LOG_WARNING,
> "============START============\n");'''
>             ret = avformat_seek_file(is->ic, -1, seek_min, seek_target,
> seek_max, is->seek_flags);
>             '''av_log(NULL, AV_LOG_WARNING,
> "============END==============\n");'''
> How to reproduce:
> # ffplay
> rtsp://10.157.216.98/media/DailyIntegrationTestStream/ts/AVC_High@L2.0_24.000fps_640x400_AAC_LC__2channels.ts
>
> Press the left arrow key to seek once.
>
> pkt->pts = 1620000
> pkt->pts = 16166409
> pkt->pts = 1618560
> pkt->pts = 16162509
> ============START============
> ============END==============
> pkt->pts = 1627500  --The new round of seek has residual data from the
> previous round.
> pkt->pts = 2423040
> pkt->pts = 2424960
> pkt->pts = 2426250

New description:

 Summary of the bug:
 add Log print location:
 int ff_read_packet(AVFormatContext *s, AVPacket *pkt):
         ret = s->iformat->read_packet(s, pkt);
         if (ret < 0) {
             .......
             continue;
         }
         '''av_log(NULL, AV_LOG_FATAL, "pkt->pts = %lld\n", pkt->pts);'''
 static int read_thread(void *arg):
             '''av_log(NULL, AV_LOG_WARNING,
 "============START============\n");'''
             ret = avformat_seek_file(is->ic, -1, seek_min, seek_target,
 seek_max, is->seek_flags);
             '''av_log(NULL, AV_LOG_WARNING,
 "============END==============\n");'''
 How to reproduce:
 # ffplay
 rtsp://10.157.216.98/media/DailyIntegrationTestStream/ts/AVC_High@L2.0_24.000fps_640x400_AAC_LC__2channels.ts

 Press the right arrow key to seek once.

 pkt->pts = 1620000
 pkt->pts = 16166409
 pkt->pts = 1618560
 pkt->pts = 16162509
 ============START============
 ============END==============
 pkt->pts = 1627500  --The new round of seek has residual data from the
 previous round.
 pkt->pts = 2423040
 pkt->pts = 2424960
 pkt->pts = 2426250

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


More information about the FFmpeg-trac mailing list