@@ -63,6 +63,8 @@ bool AVDemuxer::readFrame()
63
63
qDebug (" End of file. %s %d" , __FUNCTION__, __LINE__);
64
64
emit finished ();
65
65
}
66
+ // pkt->data = QByteArray(); //flush
67
+ // return true;
66
68
return false ; // frames after eof are eof frames
67
69
} else if (ret == AVERROR_INVALIDDATA) {
68
70
qWarning (" AVERROR_INVALIDDATA" );
@@ -434,19 +436,17 @@ void AVDemuxer::dump()
434
436
AVStream *stream = 0 ;
435
437
for (int idx = 0 ; stream_infos[idx].name != 0 ; ++idx) {
436
438
qDebug (" %s: %d" , stream_infos[idx].name , stream_infos[idx].index );
437
- if (stream_infos[idx].index < 0 || !(stream = format_context->streams [idx])) {
439
+ if (stream_infos[idx].index < 0 || !(stream = format_context->streams [stream_infos[ idx]. index ])) {
438
440
qDebug (" stream not available: index = %d, stream = %p" , stream_infos[idx].index , stream);
439
441
continue ;
440
442
}
441
- // why not fixed for video without audio?
442
- // qDebug("[AVStream::start_time = %lld]", stream->start_time);
443
+ qDebug (" [AVStream::start_time = %lld]" , stream->start_time );
443
444
AVCodecContext *ctx = stream_infos[idx].ctx ;
444
445
if (ctx) {
445
446
qDebug (" [AVCodecContext::time_base = %d / %d = %f]" , ctx->time_base .num , ctx->time_base .den , av_q2d (ctx->time_base ));
446
447
}
447
- // //why avg_frame_rate is not fixed for the same video?
448
- // qDebug("[AVStream::avg_frame_rate = %d / %d = %f]", stream->avg_frame_rate.num, stream->avg_frame_rate.den, av_q2d(stream->avg_frame_rate));
449
- // qDebug("[AVStream::time_base = %d / %d = %f]", stream->time_base.num, stream->time_base.den, av_q2d(stream->time_base));
448
+ qDebug (" [AVStream::avg_frame_rate = %d / %d = %f]" , stream->avg_frame_rate .num , stream->avg_frame_rate .den , av_q2d (stream->avg_frame_rate ));
449
+ qDebug (" [AVStream::time_base = %d / %d = %f]" , stream->time_base .num , stream->time_base .den , av_q2d (stream->time_base ));
450
450
}
451
451
452
452
}
0 commit comments