Opened 5 years ago
Closed 5 years ago
#8686 closed defect (needs_more_info)
mpegts unexpected "Unable to seek back to the start"
Reported by: | dista | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Input is mpegts over srt stream, sometimes it logs "Unable to seek back to the start" in the beginning.
After debugging, I think it is caused by mpegts.c's get_packet_size() function.
here is what happend:
- it call avio_read_partial(), and get 1316 bytes
- it calculate score=7, dvhs=2(maybe some 0x47 in middle),fec_score=2
- because score(7) == margin(2+5), it need to go to next round
- it call avio_read_partial(), but in that function "len=s->buf_end - s->buf_ptr" just equals 0, so it run "s->buf_end = s->buf_ptr = s->buffer", after that the data in buffer is dropped.
- after that, it will call seek_back(), and because we dropped data in buffer, we can not seek back.
I can remove "s->buf_end = s->buf_ptr = s->buffer" in avio_read_partial() to fix this problem, but it may break other things.
Change History (2)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Resolution: | → needs_more_info |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
You should provide the complete command line and the console output to make this a valid report.