support newer ffmpeg versions

This commit is contained in:
martii
2012-07-13 16:22:19 +02:00
parent 6f8ce7c8ca
commit 94d8b8b57d
3 changed files with 93 additions and 0 deletions

View File

@@ -24,6 +24,9 @@
#include <stdlib.h>
#include <string.h>
// >>> MARTII
#include <libavformat/avformat.h>
// <<< MARTII
#include "manager.h"
#include "common.h"
@@ -214,6 +217,17 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
case MANAGER_SET: {
int id = *((int*)argument);
// >>> MARTII
// What's the argument supposed to be? apid or local index? --martii
if (id >= TrackCount) {
int apid = id;
for (id = 0; id < TrackCount; id++) {
if (((AVStream *) (Tracks[id].stream))->id == apid)
break;
}
}
// <<< MARTII
audio_mgr_printf(20, "%s::%s MANAGER_SET id=%d\n", FILENAME, __FUNCTION__, id);
if (id < TrackCount)