History

avformat/hls: Fix get key file error

The offset and end_offset options are meant for segment, not for key.

Zhao Zhili committed 1 year ago

Commit bb0c4641 parent 25812d31 file · +1 −1Browse files

Unified · Split

libavformat/hls.c+1−1
@@ -1353,7 +1353,7 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg, · 1352 unmodified lines
1353 if (seg->key_type == KEY_AES_128 || seg->key_type == KEY_SAMPLE_AES) {1353 if (seg->key_type == KEY_AES_128 || seg->key_type == KEY_SAMPLE_AES) {
1354 if (strcmp(seg->key, pls->key_url)) {1354 if (strcmp(seg->key, pls->key_url)) {
1355 AVIOContext *pb = NULL;1355 AVIOContext *pb = NULL;
1356 if (open_url(pls->parent, &pb, seg->key, &c->avio_opts, opts, NULL) == 0) {1356 if (open_url(pls->parent, &pb, seg->key, &c->avio_opts, NULL, NULL) == 0) {
1357 ret = avio_read(pb, pls->key, sizeof(pls->key));1357 ret = avio_read(pb, pls->key, sizeof(pls->key));
1358 if (ret != sizeof(pls->key)) {1358 if (ret != sizeof(pls->key)) {
1359 av_log(pls->parent, AV_LOG_ERROR, "Unable to read key file %s\n",1359 av_log(pls->parent, AV_LOG_ERROR, "Unable to read key file %s\n",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t