[xiph-commits] r3027 - liboggplay/trunk/src/liboggplay
shans at svn.annodex.net
shans at svn.annodex.net
Sun Jun 24 00:47:22 PDT 2007
Author: shans
Date: 2007-06-24 00:47:21 -0700 (Sun, 24 Jun 2007)
New Revision: 3027
Modified:
liboggplay/trunk/src/liboggplay/oggplay_callback_info.c
liboggplay/trunk/src/liboggplay/oggplay_data.c
liboggplay/trunk/src/liboggplay/oggplay_seek.c
Log:
* set target time to a multiple of callback period after seek
* Seek forward if any tracks have no data, rather than if all tracks have no
data
* some debugging printfs in seek code
(seek code still segfaults)
Modified: liboggplay/trunk/src/liboggplay/oggplay_callback_info.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_callback_info.c 2007-06-22 07:57:43 UTC (rev 3026)
+++ liboggplay/trunk/src/liboggplay/oggplay_callback_info.c 2007-06-24 07:47:21 UTC (rev 3027)
@@ -40,13 +40,15 @@
#define M(x) ((x) >> 32)
+void _print_list(char *name, OggPlayDataHeader *p);
+
int
oggplay_callback_info_prepare(OggPlay *me, OggPlayCallbackInfo ***info) {
int i;
int tcount = 0;
- int added_required_record = 0;
+ int added_required_record = 1;
ogg_int64_t diff;
ogg_int64_t latest_first_record = 0x0LL;
@@ -87,7 +89,7 @@
count++;
}
}
-
+
if (count > 0) {
tcount = 1;
@@ -139,10 +141,11 @@
//lpt = p->presentation_time;
}
}
-
- /*
- printf("track %d: %d required, %d available\n", i,
+
+
+ printf("%d: %d/%d\t", i,
track_info->required_records, count);
+ /*
if (q != NULL) {
printf("fst: %lld lst: %lld sz: %lld pt: %lld\n",
q->presentation_time >> 32, lpt >> 32,
@@ -155,13 +158,15 @@
(
track->decoded_type != OGGPLAY_CMML
&&
- track_info->required_records > 0
+ track_info->required_records == 0
) {
- added_required_record = 1;
+ added_required_record = 0;
}
}
+ printf("\n");
+
/*
* there are no required records! This means that we need to advance the
* target to the period before the first actual record - the bitstream has
@@ -206,11 +211,13 @@
* indicate that we need to go through another round of fragment collection
* and callback creation
*/
+ printf("\tnull return\n");
(*info) = NULL;
}
if (tcount == 0) {
+ printf("\tnull return\n");
(*info) = NULL;
}
Modified: liboggplay/trunk/src/liboggplay/oggplay_data.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_data.c 2007-06-22 07:57:43 UTC (rev 3026)
+++ liboggplay/trunk/src/liboggplay/oggplay_data.c 2007-06-24 07:47:21 UTC (rev 3027)
@@ -72,7 +72,7 @@
data->next = NULL;
- if (decode->end_of_data_list == NULL) {
+ if (decode->data_list == NULL) {
decode->data_list = data;
decode->end_of_data_list = data;
} else {
Modified: liboggplay/trunk/src/liboggplay/oggplay_seek.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_seek.c 2007-06-22 07:57:43 UTC (rev 3026)
+++ liboggplay/trunk/src/liboggplay/oggplay_seek.c 2007-06-24 07:47:21 UTC (rev 3027)
@@ -87,11 +87,12 @@
end_of_list_p = &trash->old_data;
for (i = 0; i < me->num_tracks; i++) {
OggPlayDecode *track = me->decode_data[i];
- *(end_of_list_p) = track->data_list;
-
- end_of_list_p = &(track->end_of_data_list);
+ if (track->data_list != NULL) {
+ //*(end_of_list_p) = track->data_list;
+ //end_of_list_p = &(track->end_of_data_list->next);
+ //oggplay_data_free_list(track->untimed_data_list);
+ }
track->data_list = track->end_of_data_list = NULL;
- oggplay_data_free_list(track->untimed_data_list);
track->untimed_data_list = NULL;
track->current_loc = -1;
}
@@ -100,6 +101,8 @@
* set the presentation time
*/
me->presentation_time = ((ogg_int64_t)milliseconds) << 32;
+ me->presentation_time /= me->callback_period;
+ me->presentation_time *= me->callback_period;
me->target = me->presentation_time + me->callback_period;
return E_OGGPLAY_OK;
More information about the commits
mailing list