printf("new : h:%02d m:%02d s:%02d f:%02d\n",hh,mm,ss,ff);
int mean_update_gop(PackStream *ps, uint8_t *ptr){double oldms;double newms;double news,rel;uint8_t a1,a2,a3,a4;uint32_t hh,mm,ss,ff;	// compute time	newms=ps->framecount;	newms*=ps->pict_duration; // newms is in ms				// get old timestamp	a1=*ptr;	a2=*(ptr+1);	a3=*(ptr+2);	a4=*(ptr+3);	hh=(a1>>2)&0x1f;	mm=((a1&3)<<4)+(a2>>4);	ss=((a2&7)<<3)+(a3>>5);	ff=((a3&0x1f)<<1)+(a4>>7);		printf("Old : h:%02d m:%02d s:%02d f:%02d\n",hh,mm,ss,ff);			// Rebuild gop timestamp	news=newms/1000.;	hh=floor(news/(3600.));	rel=news-hh*3600.;	mm=floor( rel/60.);	rel=rel-mm*60.;	ss=floor( rel);	printf("new : h:%02d m:%02d s:%02d f:%02d\n",hh,mm,ss,ff);		*(ptr+0)=(hh<<2)+(mm>>4);	*(ptr+1)=((mm&0xf)<<4)+8+(ss>>3);	*(ptr+2)= ((ss&7)<<5)+(ff>>1);		// lowest bits of ff is left untouched	a1=*ptr;	a2=*(ptr+1);	a3=*(ptr+2);	a4=*(ptr+3);	hh=(a1>>2)&0x1f;	mm=((a1&3)<<4)+(a2>>4);	ss=((a2&7)<<3)+(a3>>5);	ff=((a3&0x1f)<<1)+(a4>>7);		printf("Fixed : h:%02d m:%02d s:%02d f:%02d\n",hh,mm,ss,ff);			}