Skip to content

Commit 7e95217

Browse files
committed
vcap/rtsp: emit_pps_fps loop fix
If h264_offset_len was 0 (SPS/PPS not in RTSP but eg. in the stream, as UltraGrid RTSP server currently does), _grab() returned NULL infinitely.
1 parent d589fff commit 7e95217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video_capture/rtsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,10 @@ vidcap_rtsp_thread(void *arg) {
370370
* only next would be displayed).
371371
*/
372372
static struct video_frame *emit_sps_pps(struct rtsp_state *s) {
373+
s->sps_pps_emitted = 1;
373374
if (s->vrtsp_state.h264_offset_len == 0) {
374375
return NULL;
375376
}
376-
s->sps_pps_emitted = 1;
377377
struct video_frame *frame = vf_alloc_desc_data(s->vrtsp_state.desc);
378378
memcpy(frame->tiles[0].data, s->vrtsp_state.h264_offset_buffer, s->vrtsp_state.h264_offset_len);
379379
frame->tiles[0].data_len = s->vrtsp_state.h264_offset_len;

0 commit comments

Comments
 (0)