11,7 → 11,7 |
#include <fcntl.h> |
#include <ctype.h> |
#include <kos32sys.h> |
#include "winlib/winlib.h" |
#include "../winlib/winlib.h" |
|
#include "sound.h" |
#include "fplay.h" |
142,8 → 142,12 |
} |
else movie_file = file_name; |
|
|
// __asm__ __volatile__("int3"); |
|
// dump_format(pFormatCtx, 0, argv[1], 0); |
|
// stream_duration = 1000.0 * pFormatCtx->duration * av_q2d(AV_TIME_BASE_Q); |
stream_duration = pFormatCtx->duration; |
|
printf("duration %f\n", (double)stream_duration); |
152,6 → 156,8 |
audioStream=-1; |
for(i=0; i < pFormatCtx->nb_streams; i++) |
{ |
// pFormatCtx->streams[i]->discard = AVDISCARD_ALL; |
|
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO |
&& videoStream < 0) |
{ |
158,6 → 164,9 |
videoStream=i; |
video_time_base = pFormatCtx->streams[i]->time_base; |
if(stream_duration == 0) |
// stream_duration = 1000.0 * |
// pFormatCtx->streams[i]->duration * |
// av_q2d(pFormatCtx->streams[i]->time_base); |
stream_duration = pFormatCtx->streams[i]->duration; |
|
} |
166,7 → 175,11 |
{ |
audioStream=i; |
if(stream_duration == 0) |
// stream_duration = 1000.0 * |
// pFormatCtx->streams[i]->duration * |
// av_q2d(pFormatCtx->streams[i]->time_base); |
stream_duration = pFormatCtx->streams[i]->duration; |
|
} |
} |
|
346,6 → 359,8 |
int err = 0; |
AVPacket packet; |
|
// __asm__ __volatile__("int3"); |
|
while( (q_video.size < 4*1024*1024) && |
!err ) |
err = load_frame(); |
384,6 → 399,8 |
{ |
int err; |
|
// __asm__ __volatile__("int3"); |
|
switch(decoder_state) |
{ |
case PREPARE: |
481,6 → 498,10 |
ret = avformat_seek_file(pFormatCtx, -1, INT64_MIN, |
rewind_pos, INT64_MAX, 0); |
|
// ret = avformat_seek_file(pFormatCtx, -1, min_pos, |
// rewind_pos, max_pos, opts); |
// __asm__ __volatile__("int3"); |
|
if (ret < 0) |
{ |
printf("could not seek to position %f\n", |