android:在内部字幕上使用MediaPlayer.SelectTrack时出现异常

时间:2015-12-27 18:12:17

标签: android android-mediaplayer subtitle

我使用#include <iostream> struct Node { int value; struct Node *next; }; struct List { struct Node *first, *last; }; Node* node(int v) { Node *newNode = new Node(); newNode->value = v; newNode->next = NULL; return newNode; } List* list() { List *newList = new List(); newList->first = NULL; newList->last = NULL; return newList; } List* insert(List* s, Node* n) { if (s->last == NULL) { n->next = s->last; s->last = n; s->first = n; return s; } s->last->next = n; s->last = s->last->next; return s; } void print(List* s) { Node *tmp = s->first; while(tmp) { std::cout << tmp->value << ' '; tmp = tmp->next; } std::cout << '\n'; } List* insertAfter(List* s, Node* curr, Node* n) { Node *currListNode = s->first; while(currListNode != NULL) { if (currListNode->value == curr->value) { n->next = currListNode->next; currListNode->next = n; break; } currListNode = currListNode->next; } return s; } List* insertBefore(List* s, Node* curr, Node* n) { Node* prev = s->first; Node* currListNode = s->first->next; while(currListNode != NULL) { if(currListNode->value == curr->value) { break; } else { prev = currListNode; currListNode = currListNode->next; } } if(currListNode != NULL) { prev->next = n; n->next = currListNode; } return s; } void deleteList(List *s) { Node * curr = s->first; while (s->first != NULL) { s->first = s->first->next; delete curr; curr = s->first; } delete s; } int main(int argc, char *argv[]) { List *myList2; myList2 = list(); myList2 = insert(myList2, node(3)); myList2 = insert(myList2, node(5)); myList2 = insert(myList2, node(7)); myList2 = insert(myList2, node(9)); myList2 = insert(myList2, node(5)); myList2 = insert(myList2, node(34)); myList2 = insert(myList2, node(67)); myList2 = insertBefore(myList2, node(9), node(1024)); myList2 = insertAfter(myList2, node(9), node(1024)); print(myList2); deleteList(myList2); } 获取timed_text_track_id并使用它将给定视频流的内部字幕更改为mediaplayer.trackinfo

当我使用SelectTrack更改此视频视图中的内部dvbsub字幕轨道时,我收到如下错误:

mediaplayer.selecttrack(timed_text_track_id)

当我使用相同的代码在同一视频流上选择音轨时,没有错误,音轨也会改变。

0 个答案:

没有答案