merge
commit
4b5af390fd
|
@ -424,6 +424,7 @@ static void zm_log_fps(double d, const char *postfix) {
|
|||
/* "user interface" functions */
|
||||
void zm_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output) {
|
||||
char buf[256];
|
||||
Debug(1, "Dumping stream index i(%d) index(%d)", i, index );
|
||||
int flags = (is_output ? ic->oformat->flags : ic->iformat->flags);
|
||||
AVStream *st = ic->streams[i];
|
||||
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
|
||||
|
|
|
@ -357,12 +357,6 @@ void VideoStore::dumpPacket( AVPacket *pkt ){
|
|||
|
||||
int VideoStore::writeVideoFramePacket(AVPacket *ipkt, AVStream *input_video_stream){
|
||||
|
||||
Debug(4, "writeVideoFrame");
|
||||
//Debug(3, "before ost_tbcket starttime %d, timebase%d", startTime, video_stream->time_base );
|
||||
//zm_dump_stream_format( oc, ipkt->stream_index, 0, 1 );
|
||||
int64_t ost_tb_start_time = av_rescale_q(startTime, AV_TIME_BASE_Q, video_stream->time_base);
|
||||
//Debug(2, "before ost_tbcket starttime %d, ost_tbcket %d", startTime, ost_tb_start_time );
|
||||
|
||||
AVPacket opkt;
|
||||
AVPicture pict;
|
||||
|
||||
|
@ -412,8 +406,10 @@ if ( 1 ) {
|
|||
|
||||
opkt.data = ipkt->data;
|
||||
opkt.size = ipkt->size;
|
||||
|
||||
// Some camera have audio on stream 0 and video on stream 1. So when we remove the audio, video stream has to go on 0
|
||||
if ( ipkt->stream_index > 0 and ! audio_stream ) {
|
||||
Warning("Setting stream index to 0 instead of %d", ipkt->stream_index );
|
||||
Debug(1,"Setting stream index to 0 instead of %d", ipkt->stream_index );
|
||||
opkt.stream_index = 0;
|
||||
} else {
|
||||
opkt.stream_index = ipkt->stream_index;
|
||||
|
|
Loading…
Reference in New Issue