Opened 20 months ago

Last modified 8 months ago

#8704 reopened defect

sps_id 0 out of range

Reported by: yunhai2009 Owned by:
Priority: important Component: avcodec
Version: 4.2 Keywords: h264 regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
when use avcodec_open2 function ,return AVERROR_INVALIDDATA . Maybe cause by ff_h264_decode_picture_parameter_set calling get_ue_golomb_31
How to reproduce:

% ffplay -i playlist-01412.ts
ffmpeg 4.2.3 by official

Opening 'C:\Users\xxx\Desktop\playlist-01412.ts' for reading
Setting default whitelist 'file,crypto'
Probing mp3 score:1 size:2048
Probing mpegts score:50 size:2048
Format mpegts probed with size=2048 and score=50
score: 44, dvhs_score: 0, fec_score: -2 
Filter: pid=0x11 type=1
Filter: pid=0x0 type=1
PAT:
sid=0x1 pid=0x20
new_program: id=0x0001
Filter: pid=0x20 type=1
PMT: len 48
sid=0x1 sec_num=0/0 version=4 tid=2
pcr_pid=0x42
program tag: 0x05 len=4
program tag: 0x88 len=4
Filter: pid=0x41 type=0
stream=0 stream_type=f pid=41 prog_reg_desc=HDMV
Filter: pid=0x42 type=0
stream=1 stream_type=1b pid=42 prog_reg_desc=HDMV
tag: 0x05 len=8
reg_desc=HDMV
tuning done
successed to open url: C:\Users\YunHai\Desktop\playlist-01412.ts !
Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:2
Skipping after seek
PAT:
sid=0x1 pid=0x20
new_program: id=0x0001
PMT: len 48
sid=0x1 sec_num=0/0 version=4 tid=2
pcr_pid=0x42
program tag: 0x05 len=4
program tag: 0x88 len=4
tag: 0x05 len=8
reg_desc=HDMV
All programs have pmt, headers found
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
sps_id 0 out of range
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 8, nal_ref_idc: 3
nal_unit_type: 7, nal_ref_idc: 3
nal_unit_type: 8, nal_ref_idc: 3
nal_unit_type: 5, nal_ref_idc: 3
sps_id 0 out of range
Reinit context to 1920x1088, pix_fmt: yuv420p
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 2
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
Invalid timestamps stream=1, pts=578362499, dts=578362500, size=1069
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 2
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 2
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 2
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
Invalid timestamps stream=1, pts=578384999, dts=578385000, size=824
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 2
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 2
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
Invalid timestamps stream=1, pts=578407499, dts=578407500, size=806
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
Invalid timestamps stream=1, pts=578429999, dts=578430000, size=796
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
Invalid timestamps stream=1, pts=578452499, dts=578452500, size=790
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
Invalid timestamps stream=1, pts=578474999, dts=578475000, size=791
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
Invalid timestamps stream=1, pts=578497499, dts=578497500, size=786
All info found
rfps: 11.750000 0.014431
rfps: 11.750000 0.014431
rfps: 11.833333 0.006414
rfps: 11.833333 0.006414
rfps: 11.916667 0.001603
rfps: 11.916667 0.001603
rfps: 12.000000 0.000000
rfps: 12.083333 0.001603
rfps: 12.083333 0.001603
rfps: 12.166667 0.006414
rfps: 12.166667 0.006414
rfps: 12.250000 0.014431
rfps: 12.250000 0.014431
rfps: 23.750000 0.014431
rfps: 23.750000 0.014431
rfps: 23.833333 0.006414
rfps: 23.833333 0.006414
rfps: 23.916667 0.001604
rfps: 23.916667 0.001604
rfps: 24.000000 0.000000
rfps: 24.000000 0.000000
rfps: 24.083333 0.001604
rfps: 24.083333 0.001604
rfps: 24.166667 0.006414
rfps: 24.166667 0.006414
rfps: 24.250000 0.014431
rfps: 24.250000 0.014431
rfps: 36.000000 0.000000
rfps: 48.000000 0.000000
rfps: 48.000000 0.000000
rfps: 60.000000 0.000000
rfps: 120.000000 0.000000
rfps: 120.000000 0.000000
rfps: 240.000000 0.000001
rfps: 240.000000 0.000001
rfps: 23.976024 0.000133
rfps: 23.976024 0.000133
rfps: 59.940060 0.000830
rfps: 59.940060 0.000830
rfps: 11.988012 0.000033
rfps: 11.988012 0.000033
rfps: 47.952048 0.000531
rfps: 47.952048 0.000531
Skipping after seek
PAT:
PMT: len 48
sid=0x1 sec_num=0/0 version=4 tid=2
pcr_pid=0x42
program tag: 0x05 len=4
program tag: 0x88 len=4
tag: 0x05 len=8
reg_desc=HDMV
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
PAT:
PMT: len 48
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=42 pes_code=0x1e0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
pid=41 pes_code=0x1c0
stream 0: start_time: 6426.016 duration: 1.997
stream 1: start_time: 6426.000 duration: 2.000
format: start_time: 6426.000 duration: 2.013 bitrate=444 kb/s
After avformat_find_stream_info() pos: 0 bytes read:223720 seeks:2 frames:96
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 8, nal_ref_idc: 3
nal_unit_type: 7, nal_ref_idc: 3
nal_unit_type: 8, nal_ref_idc: 3
Ignoring NAL type 9 in extradata
sps_id 0 out of range

Attachments (1)

playlist-01412.ts (109.2 KB ) - added by yunhai2009 20 months ago.
HLS protocol

Download all attachments as: .zip

Change History (4)

by yunhai2009, 20 months ago

Attachment: playlist-01412.ts added

HLS protocol

comment:1 by Carl Eugen Hoyos, 19 months ago

Component: ffplayavcodec
Keywords: regression added; decode removed
Priority: criticalimportant
Reproduced by developer: set
Status: newopen

Regression since 0bf5fd2e / 98c97994, fixed in d41faffb533d899ecd67f3427914153b5a5dcffb

comment:2 by Balling, 8 months ago

Resolution: fixed
Status: openclosed

As you have said it is fixed.

comment:3 by Carl Eugen Hoyos, 8 months ago

Resolution: fixed
Status: closedreopened
Note: See TracTickets for help on using tickets.