Skip to content

Commit 676f9ba

Browse files
committed
fix(hls): remove redundant context stream-name null checks
Keep empty-name validation and update its diagnostic in both teardown paths. Refs #600.
1 parent 8916027 commit 676f9ba

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/video/hls/hls_unified_thread.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,8 +1861,8 @@ void *hls_unified_thread_func(void *arg) {
18611861
bool context_valid = true;
18621862

18631863
// Basic validation of context structure
1864-
if (ctx_to_free->stream_name == NULL || ctx_to_free->stream_name[0] == '\0') {
1865-
log_warn("Context has NULL or empty stream_name, may be corrupted");
1864+
if (ctx_to_free->stream_name[0] == '\0') {
1865+
log_warn("Context has empty stream_name, may be corrupted");
18661866
context_valid = false;
18671867
}
18681868

@@ -2499,8 +2499,8 @@ int stop_hls_unified_stream(const char *stream_name) {
24992499
bool context_valid = true;
25002500

25012501
// Basic validation of context structure
2502-
if (ctx_to_free->stream_name == NULL || ctx_to_free->stream_name[0] == '\0') {
2503-
log_warn("Context has NULL or empty stream_name, may be corrupted");
2502+
if (ctx_to_free->stream_name[0] == '\0') {
2503+
log_warn("Context has empty stream_name, may be corrupted");
25042504
context_valid = false;
25052505
}
25062506

0 commit comments

Comments
 (0)