mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-18 05:48:44 -04:00
more debug
This commit is contained in:
@@ -381,16 +381,19 @@ int VideoStore::writeAudioFramePacket(AVPacket *ipkt, AVStream *input_st){
|
||||
|
||||
// Seems like it would be really weird for the codec type to NOT be audiu
|
||||
if (audio_st->codec->codec_type == AVMEDIA_TYPE_AUDIO && ipkt->dts != AV_NOPTS_VALUE) {
|
||||
Debug( 4, "code is audio, dts != AV_NOPTS_VALUE " );
|
||||
int duration = av_get_audio_frame_duration(input_st->codec, ipkt->size);
|
||||
if(!duration)
|
||||
Debug( 4, "code is audio, dts != AV_NOPTS_VALUE got duration(%d)", duration );
|
||||
if(!duration) {
|
||||
duration = input_st->codec->frame_size;
|
||||
Warning( "got no duration from av_get_audio_frame_duration. Using frame size(%d)", duration );
|
||||
}
|
||||
|
||||
//FIXME where to get filter_in_rescale_delta_last
|
||||
//FIXME av_rescale_delta doesn't exist in ubuntu vivid libavtools
|
||||
opkt.dts = opkt.pts = av_rescale_delta(input_st->time_base, ipkt->dts,
|
||||
(AVRational){1, input_st->codec->sample_rate}, duration, &filter_in_rescale_delta_last,
|
||||
audio_st->time_base) - ost_tb_start_time;
|
||||
Debug(4, "rescaled dts is: (%d)", opkt.dts );
|
||||
}
|
||||
|
||||
opkt.duration = av_rescale_q(ipkt->duration, input_st->time_base, audio_st->time_base);
|
||||
|
||||
Reference in New Issue
Block a user